From f0fa74b923e2e4afa7a5bf228d8fbbca525074cc Mon Sep 17 00:00:00 2001 From: uye <99072975+ABA2396@users.noreply.github.com> Date: Thu, 17 Apr 2025 23:43:37 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=B7=BB=E5=8A=A0=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs index 399998fee1..316d03a13e 100644 --- a/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs +++ b/src/MaaWpfGui/ViewModels/UI/SettingsViewModel.cs @@ -681,6 +681,16 @@ namespace MaaWpfGui.ViewModels.UI { var rvm = (RootViewModel)this.Parent; + string updateTip = string.Empty; + var updateTag = Instances.VersionUpdateViewModel.UpdateTag; + var coreVersion = VersionUpdateSettingsUserControlModel.CoreVersion; + var startupUpdateCheck = VersionUpdateSettings.StartupUpdateCheck; + var isDebug = Instances.VersionUpdateViewModel.IsDebugVersion(); + if (updateTag != coreVersion && !isDebug && !string.IsNullOrEmpty(updateTag) && startupUpdateCheck) + { + updateTip = $"{LocalizationHelper.GetString("NewVersionFoundTitle")}: {updateTag} - "; + } + string prefix = ConfigurationHelper.GetValue(ConfigurationKeys.WindowTitlePrefix, string.Empty); if (!string.IsNullOrEmpty(prefix)) { @@ -731,7 +741,7 @@ namespace MaaWpfGui.ViewModels.UI _ => $" - {VersionUpdateSettings.ResourceDateTime.ToString(LocalizationHelper.CustomCultureInfo.DateTimeFormat.ShortDatePattern.Replace("yyyy", string.Empty).Trim('/', '.'))} {VersionUpdateSettings.ResourceVersion}", } : string.Empty; - rvm.WindowTitle = $"{prefix}MAA{currentConfiguration} - {VersionUpdateSettingsUserControlModel.CoreVersion}{resourceVersion}{connectConfigName}{connectAddress}{clientName}"; + rvm.WindowTitle = $"{updateTip}{prefix}MAA{currentConfiguration} - {VersionUpdateSettingsUserControlModel.CoreVersion}{resourceVersion}{connectConfigName}{connectAddress}{clientName}"; } ///