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zpT$8^82>`(efr%0Q00000
LNkvXXu0mjfs72~i
literal 0
HcmV?d00001
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Achievement/AchievementDbOperation.cs b/src/Snap.Hutao/Snap.Hutao/Service/Achievement/AchievementDbOperation.cs
index ff674365..fa1af1d4 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/Achievement/AchievementDbOperation.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/Achievement/AchievementDbOperation.cs
@@ -1,8 +1,8 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core.Database;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Model.InterChange.Achievement;
using EntityAchievement = Snap.Hutao.Model.Entity.Achievement;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Achievement/AchievementService.cs b/src/Snap.Hutao/Snap.Hutao/Service/Achievement/AchievementService.cs
index f26cf7c0..e5c52f2e 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/Achievement/AchievementService.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/Achievement/AchievementService.cs
@@ -3,10 +3,10 @@
using CommunityToolkit.Mvvm.Messaging;
using Microsoft.EntityFrameworkCore;
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Core.Diagnostics;
using Snap.Hutao.Core.Logging;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Model.InterChange.Achievement;
using System.Collections.ObjectModel;
using BindingAchievement = Snap.Hutao.Model.Binding.Achievement.Achievement;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/AvatarInfo/AvatarInfoService.cs b/src/Snap.Hutao/Snap.Hutao/Service/AvatarInfo/AvatarInfoService.cs
index 74a5057d..58ba5bdd 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/AvatarInfo/AvatarInfoService.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/AvatarInfo/AvatarInfoService.cs
@@ -1,12 +1,12 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Core.Diagnostics;
using Snap.Hutao.Core.Logging;
using Snap.Hutao.Model.Binding.AvatarProperty;
using Snap.Hutao.Model.Binding.User;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Model.Metadata;
using Snap.Hutao.Service.AvatarInfo.Composer;
using Snap.Hutao.Service.AvatarInfo.Factory;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Cultivation/CultivationService.cs b/src/Snap.Hutao/Snap.Hutao/Service/Cultivation/CultivationService.cs
index 25b48ad3..6a004b93 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/Cultivation/CultivationService.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/Cultivation/CultivationService.cs
@@ -4,9 +4,9 @@
using CommunityToolkit.Mvvm.Messaging;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Model.Entity;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Model.Primitive;
using System.Collections.ObjectModel;
using BindingCultivateEntry = Snap.Hutao.Model.Binding.Cultivation.CultivateEntry;
@@ -335,6 +335,7 @@ internal class CultivationService : ICultivationService
"角色培养素材" => true,
"天赋培养素材" => true,
"武器强化素材" => true,
+ "武器突破素材" => true,
_ => false,
};
}
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/DailyNote/DailyNoteNotifier.cs b/src/Snap.Hutao/Snap.Hutao/Service/DailyNote/DailyNoteNotifier.cs
index e4b99420..60ed390f 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/DailyNote/DailyNoteNotifier.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/DailyNote/DailyNoteNotifier.cs
@@ -3,12 +3,14 @@
using CommunityToolkit.WinUI.Notifications;
using Microsoft.Extensions.DependencyInjection;
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Model.Entity;
+using Snap.Hutao.Model.Entity.Database;
+using Snap.Hutao.Model.Metadata.Converter;
using Snap.Hutao.Web.Hoyolab.Takumi.Auth;
using Snap.Hutao.Web.Hoyolab.Takumi.Binding;
using Snap.Hutao.Web.Hoyolab.Takumi.GameRecord.DailyNote;
+using Windows.Foundation.Metadata;
namespace Snap.Hutao.Service.DailyNote;
@@ -42,7 +44,7 @@ internal class DailyNoteNotifier
return;
}
- List hints = new();
+ List notifyInfos = new();
// NotifySuppressed judge
{
@@ -50,7 +52,11 @@ internal class DailyNoteNotifier
{
if (!entry.ResinNotifySuppressed)
{
- hints.Add($"当前原粹树脂:{entry.DailyNote.CurrentResin}");
+ notifyInfos.Add(new(
+ "原粹树脂",
+ "ms-appx:///Resource/Icon/UI_ItemIcon_210_256.png",
+ $"{entry.DailyNote.CurrentResin}",
+ $"当前原粹树脂:{entry.DailyNote.CurrentResin}"));
entry.ResinNotifySuppressed = true;
}
}
@@ -63,7 +69,11 @@ internal class DailyNoteNotifier
{
if (!entry.HomeCoinNotifySuppressed)
{
- hints.Add($"当前洞天宝钱:{entry.DailyNote.CurrentHomeCoin}");
+ notifyInfos.Add(new(
+ "洞天宝钱",
+ "ms-appx:///Resource/Icon/UI_ItemIcon_204.png",
+ $"{entry.DailyNote.CurrentHomeCoin}",
+ $"当前洞天宝钱:{entry.DailyNote.CurrentHomeCoin}"));
entry.HomeCoinNotifySuppressed = true;
}
}
@@ -76,7 +86,11 @@ internal class DailyNoteNotifier
{
if (!entry.DailyTaskNotifySuppressed)
{
- hints.Add(entry.DailyNote.ExtraTaskRewardDescription);
+ notifyInfos.Add(new(
+ "每日委托",
+ "ms-appx:///Resource/Icon/UI_MarkQuest_Events_Proce.png",
+ $"奖励待领取",
+ entry.DailyNote.ExtraTaskRewardDescription));
entry.DailyTaskNotifySuppressed = true;
}
}
@@ -89,7 +103,11 @@ internal class DailyNoteNotifier
{
if (!entry.TransformerNotifySuppressed)
{
- hints.Add("参量质变仪已准备完成");
+ notifyInfos.Add(new(
+ "参量质变仪",
+ "ms-appx:///Resource/Icon/UI_ItemIcon_220021.png",
+ $"准备完成",
+ "参量质变仪已准备完成"));
entry.TransformerNotifySuppressed = true;
}
}
@@ -102,7 +120,11 @@ internal class DailyNoteNotifier
{
if (!entry.ExpeditionNotifySuppressed)
{
- hints.Add("探索派遣已完成");
+ notifyInfos.Add(new(
+ "探索派遣",
+ AvatarIconConverter.IconNameToUri("UI_AvatarIcon_Side_None.png").ToString(),
+ $"已完成",
+ "探索派遣已完成"));
entry.ExpeditionNotifySuppressed = true;
}
}
@@ -112,7 +134,7 @@ internal class DailyNoteNotifier
}
}
- if (hints.Count <= 0)
+ if (notifyInfos.Count <= 0)
{
return;
}
@@ -145,15 +167,41 @@ internal class DailyNoteNotifier
builder.SetToastScenario(ToastScenario.Reminder);
}
- if (hints.Count > 2)
+ // Desktop and Mobile started supporting adaptive toasts in API contract 3 (Anniversary Update)
+ if (ApiInformation.IsApiContractPresent("Windows.Foundation.UniversalApiContract", 3))
{
- builder.AddText("多个提醒项达到设定值");
+ AdaptiveGroup group = new();
+ foreach (NotifyInfo info in notifyInfos)
+ {
+ AdaptiveSubgroup subgroup = new()
+ {
+ HintWeight = 1,
+ Children =
+ {
+ new AdaptiveImage() { Source = info.AdaptiveIcon, HintRemoveMargin = true, },
+ new AdaptiveText() { Text = info.AdaptiveHint, HintAlign = AdaptiveTextAlign.Center, },
+ new AdaptiveText() { Text = info.Title, HintAlign = AdaptiveTextAlign.Center, HintStyle = AdaptiveTextStyle.CaptionSubtle, },
+ },
+ };
+
+ group.Children.Add(subgroup);
+ }
+
+ builder.AddVisualChild(group);
+ builder.AddText("一个或多个提醒项达到设定值");
}
else
{
- foreach (string hint in hints)
+ if (notifyInfos.Count > 2)
{
- builder.AddText(hint);
+ builder.AddText("多个提醒项达到设定值");
+ }
+ else
+ {
+ foreach (NotifyInfo info in notifyInfos)
+ {
+ builder.AddText(info.Hint);
+ }
}
}
@@ -161,4 +209,20 @@ internal class DailyNoteNotifier
builder.Show();
}
}
+
+ private struct NotifyInfo
+ {
+ public string Title;
+ public string AdaptiveIcon;
+ public string AdaptiveHint;
+ public string Hint;
+
+ public NotifyInfo(string title, string adaptiveIcon, string adaptiveHint, string hint)
+ {
+ Title = title;
+ AdaptiveIcon = adaptiveIcon;
+ AdaptiveHint = adaptiveHint;
+ Hint = hint;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/DailyNote/DailyNoteService.cs b/src/Snap.Hutao/Snap.Hutao/Service/DailyNote/DailyNoteService.cs
index 3d096608..af5f580e 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/DailyNote/DailyNoteService.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/DailyNote/DailyNoteService.cs
@@ -4,12 +4,12 @@
using CommunityToolkit.Mvvm.Messaging;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Extension;
using Snap.Hutao.Message;
using Snap.Hutao.Model.Binding.User;
using Snap.Hutao.Model.Entity;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Service.User;
using Snap.Hutao.Web.Hoyolab.Takumi.GameRecord;
using System.Collections.ObjectModel;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/Factory/GachaStatisticsFactory.cs b/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/Factory/GachaStatisticsFactory.cs
index 6223426d..6f68928c 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/Factory/GachaStatisticsFactory.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/Factory/GachaStatisticsFactory.cs
@@ -1,11 +1,11 @@
// Copyright (c) DGP Studio. All rights reserved.
// Licensed under the MIT license.
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Extension;
using Snap.Hutao.Model.Binding.Gacha;
using Snap.Hutao.Model.Entity;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Model.Intrinsic;
using Snap.Hutao.Model.Metadata;
using Snap.Hutao.Model.Metadata.Avatar;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/GachaLogService.cs b/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/GachaLogService.cs
index 8413c464..e9fe376b 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/GachaLogService.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/GachaLogService.cs
@@ -3,7 +3,6 @@
using CommunityToolkit.Mvvm.Messaging;
using Microsoft.EntityFrameworkCore;
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core.Abstraction;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Core.Diagnostics;
@@ -12,6 +11,7 @@ using Snap.Hutao.Extension;
using Snap.Hutao.Model.Binding.Gacha;
using Snap.Hutao.Model.Binding.Gacha.Abstraction;
using Snap.Hutao.Model.Entity;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Model.InterChange.GachaLog;
using Snap.Hutao.Model.Metadata.Abstraction;
using Snap.Hutao.Model.Primitive;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Game/GameService.cs b/src/Snap.Hutao/Snap.Hutao/Service/Game/GameService.cs
index 34e9e1dd..74d19549 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/Game/GameService.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/Game/GameService.cs
@@ -4,12 +4,12 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.DependencyInjection;
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Core.IO.Ini;
using Snap.Hutao.Model.Binding.LaunchGame;
using Snap.Hutao.Model.Entity;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Service.Game.Locator;
using Snap.Hutao.Service.Game.Unlocker;
using Snap.Hutao.View.Dialog;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Hutao/HutaoCache.cs b/src/Snap.Hutao/Snap.Hutao/Service/Hutao/HutaoCache.cs
index 7636d7df..6db76d97 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/Hutao/HutaoCache.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/Hutao/HutaoCache.cs
@@ -160,11 +160,7 @@ internal class HutaoCache : IHutaoCache
if (idAvatarExtendedMap == null)
{
Dictionary idAvatarMap = await metadataService.GetIdToAvatarMapAsync().ConfigureAwait(false);
- idAvatarExtendedMap = new(idAvatarMap)
- {
- [AvatarIds.PlayerBoy] = new() { Name = "旅行者", Icon = "UI_AvatarIcon_PlayerBoy", Quality = Model.Intrinsic.ItemQuality.QUALITY_ORANGE },
- [AvatarIds.PlayerGirl] = new() { Name = "旅行者", Icon = "UI_AvatarIcon_PlayerGirl", Quality = Model.Intrinsic.ItemQuality.QUALITY_ORANGE },
- };
+ idAvatarExtendedMap = AvatarIds.ExtendAvatars(idAvatarMap);
}
return idAvatarExtendedMap;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Hutao/HutaoService.cs b/src/Snap.Hutao/Snap.Hutao/Service/Hutao/HutaoService.cs
index c67549f5..fbdc97bf 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/Hutao/HutaoService.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/Hutao/HutaoService.cs
@@ -2,9 +2,9 @@
// Licensed under the MIT license.
using Microsoft.Extensions.Caching.Memory;
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Model.Entity;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Web.Hutao;
using Snap.Hutao.Web.Hutao.Model;
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/SpiralAbyss/ISpiralAbyssRecordService.cs b/src/Snap.Hutao/Snap.Hutao/Service/SpiralAbyss/ISpiralAbyssRecordService.cs
new file mode 100644
index 00000000..681a1ab9
--- /dev/null
+++ b/src/Snap.Hutao/Snap.Hutao/Service/SpiralAbyss/ISpiralAbyssRecordService.cs
@@ -0,0 +1,27 @@
+// Copyright (c) DGP Studio. All rights reserved.
+// Licensed under the MIT license.
+
+using Snap.Hutao.Model.Binding.User;
+using Snap.Hutao.Model.Entity;
+using System.Collections.ObjectModel;
+
+namespace Snap.Hutao.Service.SpiralAbyss;
+
+///
+/// 深渊记录服务
+///
+internal interface ISpiralAbyssRecordService
+{
+ ///
+ /// 异步获取深渊记录集合
+ ///
+ /// 深渊记录集合
+ Task> GetSpiralAbyssCollectionAsync();
+
+ ///
+ /// 异步刷新深渊记录
+ ///
+ /// 当前角色
+ /// 任务
+ Task RefreshSpiralAbyssAsync(UserAndRole userAndRole);
+}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/SpiralAbyss/SpiralAbyssRecordService.cs b/src/Snap.Hutao/Snap.Hutao/Service/SpiralAbyss/SpiralAbyssRecordService.cs
new file mode 100644
index 00000000..07bd20c2
--- /dev/null
+++ b/src/Snap.Hutao/Snap.Hutao/Service/SpiralAbyss/SpiralAbyssRecordService.cs
@@ -0,0 +1,109 @@
+// Copyright (c) DGP Studio. All rights reserved.
+// Licensed under the MIT license.
+
+using Microsoft.EntityFrameworkCore;
+using Snap.Hutao.Core.Database;
+using Snap.Hutao.Model.Binding.User;
+using Snap.Hutao.Model.Entity;
+using Snap.Hutao.Model.Entity.Database;
+using Snap.Hutao.Web.Hoyolab.Takumi.GameRecord;
+using System.Collections.ObjectModel;
+
+namespace Snap.Hutao.Service.SpiralAbyss;
+
+///
+/// 深渊记录服务
+///
+[Injection(InjectAs.Scoped, typeof(ISpiralAbyssRecordService))]
+internal class SpiralAbyssRecordService : ISpiralAbyssRecordService
+{
+ private readonly AppDbContext appDbContext;
+ private readonly GameRecordClient gameRecordClient;
+
+ private ObservableCollection? spiralAbysses;
+
+ ///
+ /// 构造一个新的深渊记录服务
+ ///
+ /// 数据库上下文
+ /// 游戏记录客户端
+ public SpiralAbyssRecordService(AppDbContext appDbContext, GameRecordClient gameRecordClient)
+ {
+ this.appDbContext = appDbContext;
+ this.gameRecordClient = gameRecordClient;
+ }
+
+ ///
+ public async Task> GetSpiralAbyssCollectionAsync()
+ {
+ if (spiralAbysses == null)
+ {
+ List entries = await appDbContext.SpiralAbysses
+ .AsNoTracking()
+ .OrderByDescending(s => s.ScheduleId)
+ .ToListAsync()
+ .ConfigureAwait(false);
+
+ await ThreadHelper.SwitchToMainThreadAsync();
+ spiralAbysses = new(entries);
+ }
+
+ return spiralAbysses;
+ }
+
+ ///
+ public async Task RefreshSpiralAbyssAsync(UserAndRole userAndRole)
+ {
+ Web.Hoyolab.Takumi.GameRecord.SpiralAbyss.SpiralAbyss? last = await gameRecordClient
+ .GetSpiralAbyssAsync(userAndRole, SpiralAbyssSchedule.Last)
+ .ConfigureAwait(false);
+
+ if (last != null)
+ {
+ SpiralAbyssEntry? lastEntry = spiralAbysses!.SingleOrDefault(s => s.ScheduleId == last.ScheduleId);
+ if (lastEntry != null)
+ {
+ await ThreadHelper.SwitchToMainThreadAsync();
+ lastEntry.UpdateSpiralAbyss(last);
+
+ await ThreadHelper.SwitchToBackgroundAsync();
+ await appDbContext.SpiralAbysses.UpdateAndSaveAsync(lastEntry).ConfigureAwait(false);
+ }
+ else
+ {
+ SpiralAbyssEntry entry = SpiralAbyssEntry.Create(userAndRole.Role.GameUid, last);
+
+ await appDbContext.SpiralAbysses.AddAndSaveAsync(entry).ConfigureAwait(false);
+
+ await ThreadHelper.SwitchToMainThreadAsync();
+ spiralAbysses!.Insert(0, entry);
+ }
+ }
+
+ Web.Hoyolab.Takumi.GameRecord.SpiralAbyss.SpiralAbyss? current = await gameRecordClient
+ .GetSpiralAbyssAsync(userAndRole, SpiralAbyssSchedule.Current)
+ .ConfigureAwait(false);
+
+ if (current != null)
+ {
+ SpiralAbyssEntry? currentEntry = spiralAbysses!.SingleOrDefault(s => s.ScheduleId == current.ScheduleId);
+ if (currentEntry != null)
+ {
+ await ThreadHelper.SwitchToMainThreadAsync();
+ currentEntry.UpdateSpiralAbyss(current);
+
+ await ThreadHelper.SwitchToBackgroundAsync();
+ await appDbContext.SpiralAbysses.UpdateAndSaveAsync(currentEntry).ConfigureAwait(false);
+ }
+ else
+ {
+ SpiralAbyssEntry entry = SpiralAbyssEntry.Create(userAndRole.Role.GameUid, current);
+
+ await appDbContext.SpiralAbysses.AddAndSaveAsync(entry).ConfigureAwait(false);
+
+ await ThreadHelper.SwitchToMainThreadAsync();
+ spiralAbysses!.Insert(0, entry);
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Snap.Hutao/Snap.Hutao/Service/User/UserService.cs b/src/Snap.Hutao/Snap.Hutao/Service/User/UserService.cs
index 81555daf..b6a30cd5 100644
--- a/src/Snap.Hutao/Snap.Hutao/Service/User/UserService.cs
+++ b/src/Snap.Hutao/Snap.Hutao/Service/User/UserService.cs
@@ -3,10 +3,10 @@
using CommunityToolkit.Mvvm.Messaging;
using Microsoft.Extensions.DependencyInjection;
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Core.Database;
using Snap.Hutao.Extension;
using Snap.Hutao.Message;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Web.Hoyolab;
using Snap.Hutao.Web.Hoyolab.Takumi.Binding;
using System.Collections.ObjectModel;
diff --git a/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj b/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj
index eb65dd03..7fd178a9 100644
--- a/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj
+++ b/src/Snap.Hutao/Snap.Hutao/Snap.Hutao.csproj
@@ -22,7 +22,7 @@
True
F8C2255969BEA4A681CED102771BF807856AEC02
SHA256
- True
+ False
True
True
Never
@@ -53,6 +53,7 @@
+
@@ -60,6 +61,7 @@
+
@@ -95,6 +97,7 @@
+
@@ -129,6 +132,7 @@
+
@@ -136,6 +140,7 @@
+
@@ -184,6 +189,11 @@
+
+
+ MSBuild:Compile
+
+
MSBuild:Compile
diff --git a/src/Snap.Hutao/Snap.Hutao/View/MainView.xaml b/src/Snap.Hutao/Snap.Hutao/View/MainView.xaml
index 3e0ef434..e31f93ed 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/MainView.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/MainView.xaml
@@ -38,33 +38,40 @@
Content="祈愿记录"
Icon="{shcm:BitmapIcon Source=ms-appx:///Resource/Icon/UI_BtnIcon_Gacha.png}"/>
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/SettingPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/SettingPage.xaml
index 42681b42..0bb2a1e3 100644
--- a/src/Snap.Hutao/Snap.Hutao/View/Page/SettingPage.xaml
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/SettingPage.xaml
@@ -178,15 +178,6 @@
-
-
-
-
-
-
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/SpiralAbyssRecordPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/SpiralAbyssRecordPage.xaml
new file mode 100644
index 00000000..de7ec847
--- /dev/null
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/SpiralAbyssRecordPage.xaml
@@ -0,0 +1,291 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/SpiralAbyssRecordPage.xaml.cs b/src/Snap.Hutao/Snap.Hutao/View/Page/SpiralAbyssRecordPage.xaml.cs
new file mode 100644
index 00000000..a71602e3
--- /dev/null
+++ b/src/Snap.Hutao/Snap.Hutao/View/Page/SpiralAbyssRecordPage.xaml.cs
@@ -0,0 +1,22 @@
+// 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 SpiralAbyssRecordPage : ScopedPage
+{
+ ///
+ /// 构造一个新的深渊记录页面
+ ///
+ public SpiralAbyssRecordPage()
+ {
+ InitializeWith();
+ InitializeComponent();
+ }
+}
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/DailyNoteViewModel.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/DailyNoteViewModel.cs
index d5c965af..d26eb928 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/DailyNoteViewModel.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/DailyNoteViewModel.cs
@@ -3,7 +3,6 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Control;
using Snap.Hutao.Core;
using Snap.Hutao.Core.Database;
@@ -11,6 +10,7 @@ using Snap.Hutao.Factory.Abstraction;
using Snap.Hutao.Model;
using Snap.Hutao.Model.Binding.User;
using Snap.Hutao.Model.Entity;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Service.Abstraction;
using Snap.Hutao.Service.DailyNote;
using Snap.Hutao.Service.User;
diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/ExperimentalFeaturesViewModel.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/ExperimentalFeaturesViewModel.cs
index f70928dc..69677e07 100644
--- a/src/Snap.Hutao/Snap.Hutao/ViewModel/ExperimentalFeaturesViewModel.cs
+++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/ExperimentalFeaturesViewModel.cs
@@ -5,9 +5,9 @@ using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
-using Snap.Hutao.Context.Database;
using Snap.Hutao.Context.FileSystem.Location;
using Snap.Hutao.Factory.Abstraction;
+using Snap.Hutao.Model.Entity.Database;
using Snap.Hutao.Service.Abstraction;
using Snap.Hutao.Service.User;
using Snap.Hutao.Web.Hutao;
@@ -38,7 +38,6 @@ internal class ExperimentalFeaturesViewModel : ObservableObject
OpenCacheFolderCommand = asyncRelayCommandFactory.Create(OpenCacheFolderAsync);
OpenDataFolderCommand = asyncRelayCommandFactory.Create(OpenDataFolderAsync);
- UploadSpiralAbyssRecordCommand = asyncRelayCommandFactory.Create(UploadSpiralAbyssRecordAsync);
DeleteUsersCommand = asyncRelayCommandFactory.Create(DangerousDeleteUsersAsync);
DeleteAllScheduleTasksCommand = new RelayCommand(DangerousDeleteAllScheduleTasks);
}
@@ -53,10 +52,7 @@ internal class ExperimentalFeaturesViewModel : ObservableObject
///