feat: 增加 “更新日志” 按钮

This commit is contained in:
zzyyyl
2023-03-04 20:24:05 +08:00
parent f4f01c8b62
commit d93fda436b
5 changed files with 20 additions and 7 deletions

View File

@@ -1732,6 +1732,11 @@ namespace MaaWpfGui
}
}
public void ShowChangelog()
{
_windowManager.ShowWindow(_versionUpdateViewModel);
}
/* 连接设置 */
private bool _autoDetectConnection = bool.Parse(ViewStatusStorage.Get("Connect.AutoDetect", true.ToString()));

View File

@@ -960,8 +960,8 @@ namespace MaaWpfGui
public void Close()
{
RequestClose();
UpdateTag = string.Empty;
UpdateInfo = string.Empty;
/* UpdateTag = string.Empty; */
/* UpdateInfo = string.Empty; */
}
/// <summary>

View File

@@ -145,6 +145,7 @@
<system:String x:Key="UpdateCheck">Update version</system:String>
<system:String x:Key="DownloadWithAria2">Download via aria2</system:String>
<system:String x:Key="UpdateCheckNow">Check update</system:String>
<system:String x:Key="ShowChangelog">Changelog</system:String>
<system:String x:Key="NewVersionFoundTitle">New Version Found</system:String>
<system:String x:Key="NewVersionFoundDescDownloading">Downloading in the background...</system:String>

View File

@@ -146,6 +146,7 @@
<system:String x:Key="UpdateCheck">更新版本</system:String>
<system:String x:Key="DownloadWithAria2">使用 aria2 进行下载</system:String>
<system:String x:Key="UpdateCheckNow">检查更新</system:String>
<system:String x:Key="ShowChangelog">更新日志</system:String>
<system:String x:Key="NewVersionFoundTitle">检测到新版本</system:String>
<system:String x:Key="NewVersionFoundDescDownloading">正在后台下载……</system:String>

View File

@@ -92,12 +92,18 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="{Binding VersionInfo, Mode=OneWay}" />
<StackPanel Grid.Row="3" Margin="5" VerticalAlignment="Center">
<Button
Grid.Row="3"
Margin="10"
Command="{s:Action ManualUpdate}"
Content="{DynamicResource UpdateCheckNow}"
IsEnabled="{c:Binding !IsCheckingForUpdates}" />
Margin="5"
Command="{s:Action ManualUpdate}"
Content="{DynamicResource UpdateCheckNow}"
IsEnabled="{c:Binding !IsCheckingForUpdates}" />
<Button
Margin="5"
Command="{s:Action ShowChangelog}"
Content="{DynamicResource ShowChangelog}"
IsEnabled="{c:Binding !IsCheckingForUpdates}" />
</StackPanel>
</Grid>
</StackPanel>
</Grid>