mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-19 02:23:01 +08:00
@@ -253,9 +253,11 @@ 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">MirrorChyan has detected a software update. Please go to 「Settings - Software Update」 to configure CDK or using the Global source.</system:String>
|
||||
<system:String x:Key="MirrorChyanNotSupportNightly">MirrorChyan does not support nightly updates for now, and will use Global Source to check...</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">MirrorChyan has detected a resource update {0}. Please go to 「Settings - Software Update」 to configure CDK, or using the Global source click 「Resource Update」 to update manually.</system:String>
|
||||
<system:String x:Key="NewVersionFoundTitle">New Version Found</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloading">Downloading in the background……</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloadingWithGlobalSource">Downloading from 「Global Source」...</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloadingWithMirrorChyan">Downloading from 「MirrorChyan」...</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescId" xml:space="preserve">Version: </system:String>
|
||||
<system:String x:Key="NewVersionFoundDescInfo" xml:space="preserve">Info: </system:String>
|
||||
<system:String x:Key="NewVersionFoundButtonGoWebpage">Go to the website</system:String>
|
||||
|
||||
@@ -253,9 +253,11 @@
|
||||
<system:String x:Key="MirrorChyan">MirrorChyan</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkPlaceholder">更新ソース切替後入力</system:String>
|
||||
<system:String x:Key="MirrorChyanSoftwareUpdateTip">MirrorChyan はソフトウェアの更新を検出しました。CDK を構成するか、グローバル ソースを使用するには、「設定-アップデート設定」に移動してください。</system:String>
|
||||
<system:String x:Key="MirrorChyanNotSupportNightly">MirrorChyan は現時点では夜間更新をサポートしておらず、グローバル ソースを使用してチェックします...</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">MirrorChyan はリソースの更新を検出しました{0}。「設定-ソフトウェア更新」に移動して CDK を構成するか、「リソース更新」をクリックして手動で更新してください。</system:String>
|
||||
<system:String x:Key="NewVersionFoundTitle">新しいバージョンが見つかりました</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloading">バックグラウンドでダウンロードを行います……</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloadingWithGlobalSource">「Global Source」からダウンロード中...</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloadingWithMirrorChyan">「MirrorChyan」からダウンロード中...</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescId" xml:space="preserve">バージョン: </system:String>
|
||||
<system:String x:Key="NewVersionFoundDescInfo" xml:space="preserve">内容: </system:String>
|
||||
<system:String x:Key="NewVersionFoundButtonGoWebpage">Webサイトで確認</system:String>
|
||||
|
||||
@@ -253,9 +253,11 @@
|
||||
<system:String x:Key="MirrorChyan">MirrorChyan</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkPlaceholder">소스 전환 후 입력</system:String>
|
||||
<system:String x:Key="MirrorChyanSoftwareUpdateTip">MirrorChyan이 소프트웨어 업데이트를 감지했습니다.「설정 - 소프트웨어 업데이트」로 이동하여 CDK를 구성하거나 글로벌 소스를 사용하세요.</system:String>
|
||||
<system:String x:Key="MirrorChyanNotSupportNightly">MirrorChyan은 현재 야간 업데이트를 지원하지 않으며, 글로벌 소스를 사용하여 확인합니다.</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">MirrorChyan이 리소스 업데이트를 감지했습니다{0}.「설정 - 소프트웨어 업데이트」로 이동하여 CDK를 구성하거나「리소스 업데이트」를 클릭하여 수동으로 업데이트하세요.</system:String>
|
||||
<system:String x:Key="NewVersionFoundTitle">새로운 버전 확인</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloading">백그라운드에서 다운로드 중……</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloadingWithGlobalSource">「Global Source」에서 다운로드 중...</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloadingWithMirrorChyan">「MirrorChyan」에서 다운로드 중...</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescId" xml:space="preserve">버전: </system:String>
|
||||
<system:String x:Key="NewVersionFoundDescInfo" xml:space="preserve">정보: </system:String>
|
||||
<system:String x:Key="NewVersionFoundButtonGoWebpage">웹사이트로 가기</system:String>
|
||||
|
||||
@@ -253,9 +253,11 @@
|
||||
<system:String x:Key="MirrorChyan">Mirror酱</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkPlaceholder">切换更新源后填写</system:String>
|
||||
<system:String x:Key="MirrorChyanSoftwareUpdateTip">Mirror酱检测到软件更新。请前往「设置-更新设置」配置 CDK 或使用海外源。</system:String>
|
||||
<system:String x:Key="MirrorChyanNotSupportNightly">Mirror酱暂不支持内测版更新,即将使用海外源检查……</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">Mirror酱检测到资源更新{0}。可前往「设置-更新设置」配置 CDK,或使用海外源点击「资源更新」进行手动更新。</system:String>
|
||||
<system:String x:Key="NewVersionFoundTitle">检测到新版本</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloading">正在后台下载……</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloadingWithGlobalSource">正在使用「海外源」下载……</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloadingWithMirrorChyan">正在使用「Mirror酱」下载……</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescId" xml:space="preserve">版本号: </system:String>
|
||||
<system:String x:Key="NewVersionFoundDescInfo" xml:space="preserve">更新信息: </system:String>
|
||||
<system:String x:Key="NewVersionFoundButtonGoWebpage">前往页面查看</system:String>
|
||||
|
||||
@@ -253,9 +253,11 @@
|
||||
<system:String x:Key="MirrorChyan">Mirror醬</system:String>
|
||||
<system:String x:Key="MirrorChyanCdkPlaceholder">切換更新源後填寫</system:String>
|
||||
<system:String x:Key="MirrorChyanSoftwareUpdateTip">Mirror醬偵測到軟體更新。請前往「設定-更新設定」設定 CDK 或使用全域來源。</system:String>
|
||||
<system:String x:Key="MirrorChyanNotSupportNightly">Mirror醬暫不支援內測版更新,即將使用全域來源檢查…</system:String>
|
||||
<system:String x:Key="MirrorChyanResourceUpdateTip">Mirror醬偵測到資源更新{0}。請前往「設定-更新設定」設定 CDK,或使用全域來源點選「資源更新」進行手動更新。</system:String>
|
||||
<system:String x:Key="NewVersionFoundTitle">檢測到新版本</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloading">正在後臺下載……</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloadingWithGlobalSource">正在使用「全域來源」下載…</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescDownloadingWithMirrorChyan">正在使用「Mirror醬」下載…</system:String>
|
||||
<system:String x:Key="NewVersionFoundDescId" xml:space="preserve">版本號: </system:String>
|
||||
<system:String x:Key="NewVersionFoundDescInfo" xml:space="preserve">更新資訊: </system:String>
|
||||
<system:String x:Key="NewVersionFoundButtonGoWebpage">前往頁面查看</system:String>
|
||||
|
||||
@@ -553,7 +553,7 @@ public class VersionUpdateViewModel : Screen
|
||||
bool otaFound = _assetsObject != null;
|
||||
bool goDownload = otaFound && SettingsViewModel.VersionUpdateSettings.AutoDownloadUpdatePackage;
|
||||
|
||||
ShowUpdateInfo(otaFound, LocalizationHelper.GetString("NewVersionFoundButtonGoWebpage"));
|
||||
ShowUpdateInfo(otaFound, LocalizationHelper.GetString("NewVersionFoundButtonGoWebpage"), true);
|
||||
|
||||
UpdatePackageName = _assetsObject?["name"]?.ToString() ?? string.Empty;
|
||||
|
||||
@@ -679,7 +679,7 @@ public class VersionUpdateViewModel : Screen
|
||||
}
|
||||
}
|
||||
|
||||
private void ShowUpdateInfo(bool otaFound, string? text)
|
||||
private void ShowUpdateInfo(bool otaFound, string? text, bool globalSource)
|
||||
{
|
||||
bool goDownload = otaFound && SettingsViewModel.VersionUpdateSettings.AutoDownloadUpdatePackage;
|
||||
|
||||
@@ -687,7 +687,14 @@ public class VersionUpdateViewModel : Screen
|
||||
if (goDownload)
|
||||
{
|
||||
OutputDownloadProgress(downloading: false, output: LocalizationHelper.GetString("NewVersionDownloadPreparing"));
|
||||
toast.AppendContentText(LocalizationHelper.GetString("NewVersionFoundDescDownloading"));
|
||||
if (globalSource)
|
||||
{
|
||||
toast.AppendContentText(LocalizationHelper.GetString("NewVersionFoundDescDownloadingWithGlobalSource"));
|
||||
}
|
||||
else
|
||||
{
|
||||
toast.AppendContentText(LocalizationHelper.GetString("NewVersionFoundDescDownloadingWithMirrorChyan"));
|
||||
}
|
||||
}
|
||||
|
||||
if (!otaFound)
|
||||
@@ -735,6 +742,8 @@ public class VersionUpdateViewModel : Screen
|
||||
return CheckUpdateRetT.NoNeedToUpdate;
|
||||
}
|
||||
|
||||
ShowUpdateInfo(true, null, false);
|
||||
|
||||
UpdatePackageName = "MirrorChyanApp" + _mirrorcVersionName + ".zip";
|
||||
var downloaded = await DownloadFromMirrorChyan(_mirrorcDownloadUrl,
|
||||
UpdatePackageName);
|
||||
@@ -793,6 +802,13 @@ public class VersionUpdateViewModel : Screen
|
||||
return (CheckUpdateRetT.NoNeedToUpdateDebugVersion, null);
|
||||
}
|
||||
|
||||
if (SettingsViewModel.VersionUpdateSettings.VersionType ==
|
||||
VersionUpdateSettingsUserControlModel.UpdateVersionType.Nightly
|
||||
&& SettingsViewModel.VersionUpdateSettings.UpdateSource == "MirrorChyan")
|
||||
{
|
||||
ToastNotification.ShowDirect(LocalizationHelper.GetString("MirrorChyanNotSupportNightly"));
|
||||
}
|
||||
|
||||
// mirrorChyan 暂时没有支持 nightly,之后加一加
|
||||
if ((SettingsViewModel.VersionUpdateSettings.VersionType is
|
||||
VersionUpdateSettingsUserControlModel.UpdateVersionType.Beta or
|
||||
@@ -1087,14 +1103,25 @@ public class VersionUpdateViewModel : Screen
|
||||
OutputDownloadProgress(progress + $" {speedDisplay}");
|
||||
}
|
||||
|
||||
private static void OutputDownloadProgress(string output, bool downloading = true)
|
||||
private static void OutputDownloadProgress(string output, bool downloading = true, bool globalSource = true)
|
||||
{
|
||||
if (_logItemViewModels == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var log = new LogItemViewModel(downloading ? LocalizationHelper.GetString("NewVersionFoundDescDownloading") + "\n" + output : output, UiLogColor.Download);
|
||||
string fullText = string.Empty;
|
||||
if (downloading)
|
||||
{
|
||||
string key = globalSource ? "NewVersionFoundDescDownloadingWithGlobalSource" : "NewVersionFoundDescDownloadingWithMirrorChyan";
|
||||
fullText = LocalizationHelper.GetString(key) + "\n" + output;
|
||||
}
|
||||
else
|
||||
{
|
||||
fullText = output;
|
||||
}
|
||||
|
||||
var log = new LogItemViewModel(fullText, UiLogColor.Download);
|
||||
|
||||
Execute.OnUIThread(() =>
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user