From fcde9b21ae8d803dc16fe5992067cd9cced5fa73 Mon Sep 17 00:00:00 2001
From: DismissedLight <1686188646@qq.com>
Date: Fri, 3 Feb 2023 20:05:32 +0800
Subject: [PATCH] fix #442
---
src/Snap.Hutao/Snap.Hutao/.filenesting.json | 4 +-
.../Resource/Localization/SH.Designer.cs | 432 ++++++++++++++++++
.../Snap.Hutao/Resource/Localization/SH.resx | 144 ++++++
src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj | 6 -
.../Snap.Hutao/View/Page/DailyNotePage.xaml | 30 +-
.../Snap.Hutao/View/Page/GachaLogPage.xaml | 66 +--
.../View/Page/HutaoDatabasePage.xaml | 28 +-
.../View/Page/HutaoDatabasePresentPage.xaml | 311 -------------
.../Page/HutaoDatabasePresentPage.xaml.cs | 23 -
.../Snap.Hutao/View/Page/TestPage.xaml | 4 -
.../Snap.Hutao/ViewModel/TestViewModel.cs | 13 -
.../ViewModel/WikiAvatarViewModel.cs | 25 +-
.../ViewModel/WikiWeaponViewModel.cs | 21 +-
13 files changed, 665 insertions(+), 442 deletions(-)
delete mode 100644 src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePresentPage.xaml
delete mode 100644 src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePresentPage.xaml.cs
diff --git a/src/Snap.Hutao/Snap.Hutao/.filenesting.json b/src/Snap.Hutao/Snap.Hutao/.filenesting.json
index 8c51f689..d1473ce7 100644
--- a/src/Snap.Hutao/Snap.Hutao/.filenesting.json
+++ b/src/Snap.Hutao/Snap.Hutao/.filenesting.json
@@ -21,8 +21,8 @@
"add": {
".filenesting.json": [ "App.xaml.cs" ],
"app.manifest": [ "App.xaml.cs" ],
- "Package.appxmanifest": [ "App.xaml.cs" ],
- "Package.StoreAssociation.xml": [ "App.xaml.cs" ],
+ "Package.appxmanifest": [ "App.xaml" ],
+ "Package.StoreAssociation.xml": [ "App.xaml" ],
".editorconfig": [ "Program.cs" ],
"GlobalUsing.cs": [ "Program.cs" ]
}
diff --git a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.Designer.cs b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.Designer.cs
index c19f18a8..ac22453f 100644
--- a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.Designer.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.Designer.cs
@@ -1464,6 +1464,438 @@ namespace Snap.Hutao.Resource.Localization {
}
}
+ ///
+ /// 查找类似 添加角色 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteAddEntry {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteAddEntry", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 添加角色以定时刷新 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteAddEntryHint {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteAddEntryHint", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 添加 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteAddEntryToolTip {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteAddEntryToolTip", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 通知 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteNotificationHeader {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteNotificationHeader", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 通知设置 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteNotificationSetting {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteNotificationSetting", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 立即刷新 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteRefresh {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteRefresh", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 刷新间隔时间 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteRefreshTime {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteRefreshTime", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 防止通知自动收入操作中心 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteReminderDescription {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteReminderDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 提醒通知 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteReminderHeader {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteReminderHeader", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 移除用户 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteRemoveToolTip {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteRemoveToolTip", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 本周已消耗减半次数 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteResinDiscountUsed {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteResinDiscountUsed", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 在我游玩原神时不通知我 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteSlientModeDescription {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteSlientModeDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 免打扰模式 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteSlientModeHeader {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteSlientModeHeader", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 验证当前账号角色 的本地化字符串。
+ ///
+ internal static string ViewPageDailyNoteVerify {
+ get {
+ return ResourceManager.GetString("ViewPageDailyNoteVerify", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 全量刷新 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogAggressiveRefresh {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogAggressiveRefresh", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 导出 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogExportAction {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogExportAction", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 尚未获取任何祈愿记录 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogHint {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogHint", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 导入 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogImportAction {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogImportAction", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 导入从其他 App 中导出的数据 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogImportDescription {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogImportDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 导入 UIGF Json 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogImportHeader {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogImportHeader", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 输入 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogInputAction {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogInputAction", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 刷新 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogRefresh {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogRefresh", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 获取 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogRefreshAction {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogRefreshAction", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 手动输入 Url 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogRefreshBymanualInput {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogRefreshBymanualInput", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 使用由你提供的 Url 刷新祈愿记录 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogRefreshBymanualInputDescription {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogRefreshBymanualInputDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 Stoken 刷新 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogRefreshByStoken {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogRefreshByStoken", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 使用当前账号的 Cookie 信息刷新祈愿记录 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogRefreshByStokenDescription {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogRefreshByStokenDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 网页缓存刷新 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogRefreshByWebCache {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogRefreshByWebCache", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 使用游戏内浏览器的网页缓存刷新祈愿记录 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogRefreshByWebCacheDescription {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogRefreshByWebCacheDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 删除当前存档 的本地化字符串。
+ ///
+ internal static string ViewPageGachaLogRemoveArchiveAction {
+ get {
+ return ResourceManager.GetString("ViewPageGachaLogRemoveArchiveAction", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 角色 的本地化字符串。
+ ///
+ internal static string ViewPageGahcaLogPivotAvatar {
+ get {
+ return ResourceManager.GetString("ViewPageGahcaLogPivotAvatar", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 历史 的本地化字符串。
+ ///
+ internal static string ViewPageGahcaLogPivotHistory {
+ get {
+ return ResourceManager.GetString("ViewPageGahcaLogPivotHistory", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 总览 的本地化字符串。
+ ///
+ internal static string ViewPageGahcaLogPivotOverview {
+ get {
+ return ResourceManager.GetString("ViewPageGahcaLogPivotOverview", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 武器 的本地化字符串。
+ ///
+ internal static string ViewPageGahcaLogPivotWeapon {
+ get {
+ return ResourceManager.GetString("ViewPageGahcaLogPivotWeapon", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 详情 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverview {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverview", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 角色出场 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewAvatarAppearanceRank {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewAvatarAppearanceRank", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 角色持有 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewAvatarConstellation {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewAvatarConstellation", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 角色使用 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewAvatarUsageRank {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewAvatarUsageRank", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 数据收集统计 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewDataCollect {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewDataCollect", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 上传记录总数 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewRecordTotal {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewRecordTotal", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 数据刷新时间 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewRefreshTime {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewRefreshTime", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 深渊数据统计 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewSpiralAbyss {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewSpiralAbyss", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 平均战斗次数 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewSpiralAbyssBattleAverage {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewSpiralAbyssBattleAverage", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 满星深渊记录 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewSpiralAbyssFullStar {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewSpiralAbyssFullStar", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 通关深渊记录 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewSpiralAbyssPassed {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewSpiralAbyssPassed", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 平均获取渊星 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewSpiralAbyssStarAverage {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewSpiralAbyssStarAverage", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 总计深渊记录 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewSpiralAbyssTotal {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewSpiralAbyssTotal", resourceCulture);
+ }
+ }
+
+ ///
+ /// 查找类似 队伍出场 的本地化字符串。
+ ///
+ internal static string ViewPageHutaoDatabaseOverviewTeamAppearance {
+ get {
+ return ResourceManager.GetString("ViewPageHutaoDatabaseOverviewTeamAppearance", resourceCulture);
+ }
+ }
+
///
/// 查找类似 角色资料 的本地化字符串。
///
diff --git a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx
index a445151b..379f0a67 100644
--- a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx
+++ b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx
@@ -585,6 +585,150 @@
添加任意武器到养成计划
+
+ 添加角色
+
+
+ 添加角色以定时刷新
+
+
+ 添加
+
+
+ 通知
+
+
+ 通知设置
+
+
+ 立即刷新
+
+
+ 刷新间隔时间
+
+
+ 防止通知自动收入操作中心
+
+
+ 提醒通知
+
+
+ 移除用户
+
+
+ 本周已消耗减半次数
+
+
+ 在我游玩原神时不通知我
+
+
+ 免打扰模式
+
+
+ 验证当前账号角色
+
+
+ 全量刷新
+
+
+ 导出
+
+
+ 尚未获取任何祈愿记录
+
+
+ 导入
+
+
+ 导入从其他 App 中导出的数据
+
+
+ 导入 UIGF Json
+
+
+ 输入
+
+
+ 刷新
+
+
+ 获取
+
+
+ 手动输入 Url
+
+
+ 使用由你提供的 Url 刷新祈愿记录
+
+
+ Stoken 刷新
+
+
+ 使用当前账号的 Cookie 信息刷新祈愿记录
+
+
+ 网页缓存刷新
+
+
+ 使用游戏内浏览器的网页缓存刷新祈愿记录
+
+
+ 删除当前存档
+
+
+ 角色
+
+
+ 历史
+
+
+ 总览
+
+
+ 武器
+
+
+ 详情
+
+
+ 角色出场
+
+
+ 角色持有
+
+
+ 角色使用
+
+
+ 数据收集统计
+
+
+ 上传记录总数
+
+
+ 数据刷新时间
+
+
+ 深渊数据统计
+
+
+ 平均战斗次数
+
+
+ 满星深渊记录
+
+
+ 通关深渊记录
+
+
+ 平均获取渊星
+
+
+ 总计深渊记录
+
+
+ 队伍出场
+
角色资料
diff --git a/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj b/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj
index 96fb6544..ff4a5d19 100644
--- a/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj
+++ b/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj
@@ -102,7 +102,6 @@
-
@@ -208,11 +207,6 @@
MSBuild:Compile
-
-
- MSBuild:Compile
-
-
MSBuild:Compile
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml
index 83af5872..56cb3a26 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml
@@ -36,8 +36,8 @@
-
+ Label="{shcm:ResourceString Name=ViewPageDailyNoteRefresh}"/>
+
@@ -50,7 +50,7 @@
+ Text="{shcm:ResourceString Name=ViewPageDailyNoteAddEntryHint}"/>
@@ -67,7 +67,7 @@
Content=""
FontFamily="{StaticResource SymbolThemeFontFamily}"
Style="{StaticResource ButtonRevealStyle}"
- ToolTipService.ToolTip="添加"/>
+ ToolTipService.ToolTip="{shcm:ResourceString Name=ViewPageDailyNoteAddEntryToolTip}"/>
@@ -80,14 +80,14 @@
-
+ Label="{shcm:ResourceString Name=ViewPageDailyNoteVerify}"/>
+
-
+
@@ -95,10 +95,10 @@
-
+
+ ToolTipService.ToolTip="{shcm:ResourceString Name=ViewPageDailyNoteRemoveToolTip}"/>
+ ToolTipService.ToolTip="{shcm:ResourceString Name=ViewPageDailyNoteNotificationSetting}"/>
@@ -337,7 +337,7 @@
Margin="4,4,0,0"
Opacity="0.6"
Style="{StaticResource CaptionTextBlockStyle}"
- Text="本周已消耗减半次数"/>
+ Text="{shcm:ResourceString Name=ViewPageDailyNoteResinDiscountUsed}"/>
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml
index 860031bd..1cc2adac 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/GachaLogPage.xaml
@@ -44,25 +44,25 @@
-
+
+ Text="{shcm:ResourceString Name=ViewPageGachaLogRefreshByStoken}"/>
+ Text="{shcm:ResourceString Name=ViewPageGachaLogRefreshByWebCache}"/>
+ Text="{shcm:ResourceString Name=ViewPageGachaLogRefreshBymanualInput}"/>
+ Text="{shcm:ResourceString Name=ViewPageGachaLogAggressiveRefresh}"/>
@@ -70,20 +70,20 @@
+ Label="{shcm:ResourceString Name=ViewPageGachaLogImportAction}"/>
+ Label="{shcm:ResourceString Name=ViewPageGachaLogExportAction}"/>
+ Label="{shcm:ResourceString Name=ViewPageGachaLogRemoveArchiveAction}"/>
-
+
@@ -105,7 +105,7 @@
DataContext="{Binding Statistics.PermanentWish}"/>
-
+
@@ -265,7 +265,7 @@
@@ -293,7 +293,7 @@
@@ -322,13 +322,13 @@
-
+
+ Text="{shcm:ResourceString Name=ViewControlStatisticsCardOrangeText}"/>
@@ -355,7 +355,7 @@
+ Text="{shcm:ResourceString Name=ViewControlStatisticsCardPurpleText}"/>
@@ -381,13 +381,13 @@
-
+
+ Text="{shcm:ResourceString Name=ViewControlStatisticsCardOrangeText}"/>
@@ -414,7 +414,7 @@
+ Text="{shcm:ResourceString Name=ViewControlStatisticsCardPurpleText}"/>
@@ -441,7 +441,7 @@
+ Text="{shcm:ResourceString Name=ViewControlStatisticsCardBlueText}"/>
@@ -479,32 +479,32 @@
Margin="0,16,0,0"
HorizontalAlignment="Center"
Style="{StaticResource SubtitleTextBlockStyle}"
- Text="尚未获取任何祈愿记录"/>
+ Text="{shcm:ResourceString Name=ViewPageGachaLogHint}"/>
-
+
-
+
-
+
-
+
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePage.xaml
index 3cad88ba..1716e126 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePage.xaml
@@ -66,17 +66,17 @@
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
-
+
+
@@ -105,7 +105,7 @@
-
+
@@ -133,7 +133,7 @@
-
+
@@ -161,7 +161,7 @@
-
+
@@ -194,7 +194,7 @@
-
+
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePresentPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePresentPage.xaml
deleted file mode 100644
index 4976f857..00000000
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePresentPage.xaml
+++ /dev/null
@@ -1,311 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePresentPage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePresentPage.xaml.cs
deleted file mode 100644
index 77705558..00000000
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/HutaoDatabasePresentPage.xaml.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright (c) DGP Studio. All rights reserved.
-// Licensed under the MIT license.
-
-using Snap.Hutao.Control;
-using Snap.Hutao.ViewModel;
-
-namespace Snap.Hutao.View.Page;
-
-///
-/// 用于展示用途的胡桃数据库页面
-/// 仅用于发布相关的统计数据
-///
-public sealed partial class HutaoDatabasePresentPage : ScopedPage
-{
- ///
- /// 构造一个新的胡桃数据库页面
- ///
- public HutaoDatabasePresentPage()
- {
- InitializeComponent();
- InitializeWith();
- }
-}
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/TestPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/TestPage.xaml
index ed8945aa..0a2af1be 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/TestPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/TestPage.xaml
@@ -32,10 +32,6 @@
-
-
-
-
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/TestViewModel.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/TestViewModel.cs
index 29f3f76c..c19b1385 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/TestViewModel.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/TestViewModel.cs
@@ -27,7 +27,6 @@ internal class TestViewModel : Abstraction.ViewModel
ShowAdoptCalculatorDialogCommand = new AsyncRelayCommand(ShowAdoptCalculatorDialogAsync);
DangerousLoginMihoyoBbsCommand = new AsyncRelayCommand(DangerousLoginMihoyoBbsAsync);
DownloadStaticFileCommand = new AsyncRelayCommand(DownloadStaticFileAsync);
- HutaoDatabasePresentCommand = new RelayCommand(HutaoDatabasePresent);
}
///
@@ -50,11 +49,6 @@ internal class TestViewModel : Abstraction.ViewModel
///
public ICommand DownloadStaticFileCommand { get; }
- ///
- /// 胡桃数据库呈现命令
- ///
- public ICommand HutaoDatabasePresentCommand { get; }
-
private async Task ShowCommunityGameRecordDialogAsync()
{
// ContentDialog must be created by main thread.
@@ -121,11 +115,4 @@ internal class TestViewModel : Abstraction.ViewModel
}
}
}
-
- private void HutaoDatabasePresent()
- {
- Ioc.Default
- .GetRequiredService()
- .Navigate(Service.Navigation.INavigationAwaiter.Default);
- }
}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/WikiAvatarViewModel.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/WikiAvatarViewModel.cs
index 6a4d4f00..eeedd48e 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/WikiAvatarViewModel.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/WikiAvatarViewModel.cs
@@ -204,49 +204,52 @@ internal class WikiAvatarViewModel : Abstraction.ViewModel
private static bool DoFilter(string input, Avatar avatar)
{
- bool keep = true;
+ List matches = new();
foreach (StringSegment segment in new StringTokenizer(input, ' '.Enumerate().ToArray()))
{
string value = segment.ToString();
+ if (avatar.Name == value)
+ {
+ matches.Add(true);
+ continue;
+ }
+
if (value == "火" || value == "水" || value == "草" || value == "雷" || value == "冰" || value == "风" || value == "岩")
{
- keep = keep && avatar.FetterInfo.VisionBefore == value;
+ matches.Add(avatar.FetterInfo.VisionBefore == value);
continue;
}
if (IntrinsicImmutables.AssociationTypes.Contains(value))
{
- keep = keep && avatar.FetterInfo.Association.GetDescriptionOrNull() == value;
+ matches.Add(avatar.FetterInfo.Association.GetDescriptionOrNull() == value);
continue;
}
if (IntrinsicImmutables.WeaponTypes.Contains(value))
{
- keep = keep && avatar.Weapon.GetDescriptionOrNull() == value;
+ matches.Add(avatar.Weapon.GetDescriptionOrNull() == value);
continue;
}
if (IntrinsicImmutables.ItemQualities.Contains(value))
{
- keep = keep && avatar.Quality.GetDescriptionOrNull() == value;
+ matches.Add(avatar.Quality.GetDescriptionOrNull() == value);
continue;
}
if (IntrinsicImmutables.BodyTypes.Contains(value))
{
- keep = keep && avatar.Body.GetDescriptionOrNull() == value;
+ matches.Add(avatar.Body.GetDescriptionOrNull() == value);
continue;
}
- if (avatar.Name == value)
- {
- keep = true;
- }
+ matches.Add(false);
}
- return keep;
+ return matches.Count > 0 && matches.Aggregate((a, b) => a && b);
}
}
}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/WikiWeaponViewModel.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/WikiWeaponViewModel.cs
index ac36e97d..856f0998 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/WikiWeaponViewModel.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/WikiWeaponViewModel.cs
@@ -202,37 +202,38 @@ internal class WikiWeaponViewModel : Abstraction.ViewModel
private static bool DoFilter(string input, Weapon weapon)
{
- bool keep = true;
+ List matches = new();
foreach (StringSegment segment in new StringTokenizer(input, ' '.Enumerate().ToArray()))
{
string value = segment.ToString();
+ if (weapon.Name == value)
+ {
+ matches.Add(true);
+ continue;
+ }
+
if (IntrinsicImmutables.WeaponTypes.Contains(value))
{
- keep = keep && weapon.WeaponType.GetDescriptionOrNull() == value;
+ matches.Add(weapon.WeaponType.GetDescriptionOrNull() == value);
continue;
}
if (IntrinsicImmutables.ItemQualities.Contains(value))
{
- keep = keep && weapon.Quality.GetDescriptionOrNull() == value;
+ matches.Add(weapon.Quality.GetDescriptionOrNull() == value);
continue;
}
if (IntrinsicImmutables.FightProperties.Contains(value))
{
- keep = keep && weapon.Property.Properties.ElementAtOrDefault(1).GetDescriptionOrNull() == value;
+ matches.Add(weapon.Property.Properties.ElementAtOrDefault(1).GetDescriptionOrNull() == value);
continue;
}
-
- if (weapon.Name == value)
- {
- keep = true;
- }
}
- return keep;
+ return matches.Count > 0 && matches.Aggregate((a, b) => a && b);
}
}
}
\ No newline at end of file