Improved UI for Desktop CheckUpdate

pull/5829/head
2dust 2 months ago
parent fe81b51dcb
commit 3ecbd3bc10

@ -10,15 +10,7 @@
d:DesignWidth="800"
x:DataType="vms:CheckUpdateViewModel"
mc:Ignorable="d">
<Button
Classes="Tertiary"
FontWeight="Regular"
Theme="{DynamicResource BorderlessButton}">
<Button.Content>
<TextBlock Text="{x:Static resx:ResUI.menuCheckUpdate}" />
</Button.Content>
<Button.Flyout>
<Flyout Placement="RightEdgeAlignedTop">
<DockPanel Margin="16">
<StackPanel
HorizontalAlignment="Right"
@ -93,7 +85,5 @@
</ListBox>
</StackPanel>
</DockPanel>
</Flyout>
</Button.Flyout>
</Button>
</UserControl>

@ -90,11 +90,7 @@
</MenuItem.Header>
</MenuItem>
<MenuItem Padding="8,0">
<MenuItem.Header>
<ContentControl x:Name="conCheckUpdate" />
</MenuItem.Header>
</MenuItem>
<MenuItem x:Name="menuCheckUpdate" Header="{x:Static resx:ResUI.menuCheckUpdate}" />
<MenuItem x:Name="menuHelp" Padding="8,0">
<MenuItem.Header>

@ -20,6 +20,7 @@ namespace v2rayN.Desktop.Views
{
private static Config _config;
private WindowNotificationManager? _manager;
private CheckUpdateView? _checkUpdateView;
private BackupAndRestoreView? _backupAndRestoreView;
public MainWindow()
@ -36,6 +37,7 @@ namespace v2rayN.Desktop.Views
menuSettingsSetUWP.Click += menuSettingsSetUWP_Click;
menuPromotion.Click += menuPromotion_Click;
menuClose.Click += menuClose_Click;
menuCheckUpdate.Click += MenuCheckUpdate_Click;
menuBackupAndRestore.Click += MenuBackupAndRestore_Click;
var IsAdministrator = true;//WindowsUtils.IsAdministrator();
@ -156,7 +158,6 @@ namespace v2rayN.Desktop.Views
tabClashConnections2.Content ??= new ClashConnectionsView();
}
conTheme.Content ??= new ThemeSettingView();
conCheckUpdate.Content ??= new CheckUpdateView();
RestoreUI();
AddHelpMenuItem();
@ -368,7 +369,13 @@ namespace v2rayN.Desktop.Views
//ViewModel?.ScanScreenTaskAsync(result);
}
private void MenuBackupAndRestore_Click(object sender, RoutedEventArgs e)
private void MenuCheckUpdate_Click(object? sender, RoutedEventArgs e)
{
_checkUpdateView ??= new CheckUpdateView();
DialogHost.Show(_checkUpdateView);
}
private void MenuBackupAndRestore_Click(object? sender, RoutedEventArgs e)
{
_backupAndRestoreView ??= new BackupAndRestoreView(this);
DialogHost.Show(_backupAndRestoreView);

Loading…
Cancel
Save