mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 18:47:55 +08:00
chore: 添加资源更新提示
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=ccast/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cdfend/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cguard/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Chayn/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Chyan/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cmedic/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Collapsal/@EntryIndexedValue">True</s:Boolean>
|
||||
@@ -97,6 +98,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=memuc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Minitouch/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=mirrorc/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mirrorchyan/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mizuki/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Mumu/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Nemu/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
@@ -92,6 +92,8 @@ namespace MaaWpfGui.Models
|
||||
_logger.Error("Failed to delete MaaResource: " + e.Message);
|
||||
}
|
||||
|
||||
SettingsViewModel.VersionUpdateSettings.NewResourceFoundInfo = string.Empty;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -200,6 +202,8 @@ namespace MaaWpfGui.Models
|
||||
_ => $"「{version.ToString(LocalizationHelper.CustomCultureInfo.DateTimeFormat.ShortDatePattern.Replace("yyyy", string.Empty).Trim('/', '.'))} {releaseNote}」",
|
||||
};
|
||||
|
||||
SettingsViewModel.VersionUpdateSettings.NewResourceFoundInfo = string.Format(LocalizationHelper.GetString("MirrorChyanResourceUpdateShortTip"), releaseNote);
|
||||
|
||||
if (string.IsNullOrEmpty(cdk))
|
||||
{
|
||||
ToastNotification.ShowDirect(string.Format(LocalizationHelper.GetString("MirrorChyanResourceUpdateTip"), releaseNote));
|
||||
@@ -270,6 +274,8 @@ namespace MaaWpfGui.Models
|
||||
_logger.Error("Failed to delete MaaResourceMirrorchyan: " + e.Message);
|
||||
}
|
||||
|
||||
SettingsViewModel.VersionUpdateSettings.NewResourceFoundInfo = string.Empty;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +277,8 @@ You can cancel this popup by clicking the Settings - About Us - Issue Reporting
|
||||
<system:String x:Key="MirrorChyan">MirrorChyan</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkPlaceholder">Fill after switching source</system:String>
|
||||
<system:String x:Key="MirrorChyanSoftwareUpdateTip">Software update detected. Please go to 「Settings - Update Settings」 to configure MirrorChyan CDK or switch to Global Source.</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">Resource update {0} detected. Please go to 「Settings- Update Settings- Resource Update」 to update manually, or fill in MirrorChayn CDK to update automatically.</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">Resource update {0} detected. Please go to 「Settings- Update Settings - Resource Update」 to update manually, or fill in MirrorChayn CDK to update automatically.</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateShortTip">Resource update {0} detected</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkExpired">The CDK has expired. Please use a new CDK for authorization.</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkInvalid">The CDK is invalid. Please check if the input is correct.</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkQuotaExhausted">The CDK has reached the maximum download limit for today. Please try again tomorrow.</system:String>
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
<system:String x:Key="MirrorChyanCdkPlaceholder">更新ソース切替後入力</system:String>
|
||||
<system:String x:Key="MirrorChyanSoftwareUpdateTip">ソフトウェア更新が検出されました。「設定 - 更新設定」に移動して MirrorChyan CDK を設定するか、グローバル ソースに切り替えてください。</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">リソース更新 {0} が検出されました。「設定 - 更新設定 - リソース更新」に移動して手動で更新するか、MirrorChayn CDK を入力して自動的に更新してください。</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateShortTip">リソース更新 {0} が検出されました</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkExpired">CDK の有効期限が切れました。新しい CDK を使用して認証してください。</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkInvalid">CDK が無効です。入力が正しいか確認してください。</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkQuotaExhausted">CDK の本日のダウンロード回数が上限に達しました。明日もう一度お試しください。</system:String>
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
<system:String x:Key="MirrorChyanCdkPlaceholder">소스 전환 후 입력</system:String>
|
||||
<system:String x:Key="MirrorChyanSoftwareUpdateTip">소프트웨어 업데이트가 감지되었습니다. 「설정 - 업데이트 설정」으로 이동하여 MirrorChyan CDK를 구성하거나 글로벌 소스로 전환하세요.</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">리소스 업데이트 {0}이 감지되었습니다. 「설정 - 업데이트 설정 - 리소스 업데이트」로 이동하여 수동으로 업데이트하거나, MirrorChyan CDK를 입력하여 자동으로 업데이트하세요.</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateShortTip">리소스 업데이트 {0}이 감지되었습니다</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkExpired">CDK가 만료되었습니다. 새 CDK로 인증해 주세요.</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkInvalid">CDK가 유효하지 않습니다. 입력값이 올바른지 확인해 주세요.</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkQuotaExhausted">해당 CDK의 일일 다운로드 횟수가 제한에 도달했습니다. 내일 다시 시도해 주세요.</system:String>
|
||||
@@ -782,7 +783,7 @@ C:\\leidian\\LDPlayer9
|
||||
<system:String x:Key="CompleteTask" xml:space="preserve">작업 완료: </system:String>
|
||||
<system:String x:Key="StartCombat" xml:space="preserve">작전 시작: </system:String>
|
||||
<system:String x:Key="CompleteCombat">작전 완료</system:String>
|
||||
<system:String x:Key="AllTasksComplete">모든 작업을 완료했습니다!\n(소요 시간: {0})</system:String>
|
||||
<system:String x:Key="AllTasksComplete">모든 작업을 완료했습니다!\n(소요 시간: {0})</system:String>
|
||||
<system:String x:Key="SanityReport">{DateTime}에 이성이 모두 회복됩니다.\n(남은 시간: {TimeDiff})</system:String>
|
||||
<system:String x:Key="AllTaskCompleteContent">MAA가 {Preset} 구성으로 모든 작업을 {DateTime}에 완료했습니다. (소요 시간: {TimeDiff})</system:String>
|
||||
<system:String x:Key="BackgroundLinkStarted">작업 시작됨</system:String>
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
<system:String x:Key="MirrorChyanCdkPlaceholder">切换更新源后填写</system:String>
|
||||
<system:String x:Key="MirrorChyanSoftwareUpdateTip">检测到软件更新。请前往「设置-更新设置」配置 Mirror酱 CDK 或切换海外源。</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">检测到资源更新{0}。请前往「设置-更新设置-资源更新」手动更新,或配置 Mirror酱 CDK 以自动更新。</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateShortTip">检测到资源更新{0}</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkExpired">CDK 已过期,请使用新的 CDK 进行授权。</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkInvalid">CDK 无效,请检查输入是否正确。</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkQuotaExhausted">CDK 今日下载次数已达上限,请明日再试。</system:String>
|
||||
|
||||
@@ -278,6 +278,7 @@
|
||||
<system:String x:Key="MirrorChyanCdkPlaceholder">切換更新源後填寫</system:String>
|
||||
<system:String x:Key="MirrorChyanSoftwareUpdateTip">偵測到軟體更新。請前往「設定-更新設定」設定 MirrorChyan CDK 或切換到全域來源。</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">偵測到資源更新{0}。請前往「設定-更新設定-資源更新」手動更新,或設定 MirrorChayn CDK 以自動更新。</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateShortTip">偵測到資源更新{0}</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkExpired">CDK 已過期,請使用新的 CDK 進行授權。</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkInvalid">CDK 無效,請檢查輸入是否正確。</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkQuotaExhausted">CDK 今日下載次數已達上限,請明日再試。</system:String>
|
||||
|
||||
@@ -691,6 +691,12 @@ namespace MaaWpfGui.ViewModels.UI
|
||||
updateTip = $"{LocalizationHelper.GetString("NewVersionFoundTitle")}: {updateTag} - ";
|
||||
}
|
||||
|
||||
var newResourceFoundInfo = VersionUpdateSettings.NewResourceFoundInfo;
|
||||
if (!string.IsNullOrEmpty(newResourceFoundInfo))
|
||||
{
|
||||
updateTip += $"{newResourceFoundInfo} - ";
|
||||
}
|
||||
|
||||
string prefix = ConfigurationHelper.GetValue(ConfigurationKeys.WindowTitlePrefix, string.Empty);
|
||||
if (!string.IsNullOrEmpty(prefix))
|
||||
{
|
||||
|
||||
@@ -82,6 +82,7 @@ public class VersionUpdateViewModel : Screen
|
||||
{
|
||||
SetAndNotify(ref _updateTag, value);
|
||||
ConfigurationHelper.SetGlobalValue(ConfigurationKeys.VersionName, value);
|
||||
Instances.SettingsViewModel.UpdateWindowTitle();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -94,6 +94,18 @@ public class VersionUpdateSettingsUserControlModel : PropertyChangedBase
|
||||
|
||||
private static string _resourceVersion = _resourceInfo.VersionName;
|
||||
|
||||
private string _newResourceFoundInfo = string.Empty;
|
||||
|
||||
public string NewResourceFoundInfo
|
||||
{
|
||||
get => _newResourceFoundInfo;
|
||||
set
|
||||
{
|
||||
SetAndNotify(ref _newResourceFoundInfo, value);
|
||||
Instances.SettingsViewModel.UpdateWindowTitle();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the resource version.
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user