diff --git a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx index b466351e..ee5fff22 100644 --- a/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx +++ b/src/Snap.Hutao/Snap.Hutao/Resource/Localization/SH.resx @@ -244,7 +244,7 @@ 尚未刷新 - 刷新于 {0:yyyy/MM/dd HH:mm:ss} + 刷新于 {0:yyyy.MM.dd HH:mm:ss} 第 {0} 期 @@ -834,7 +834,7 @@ 在读取游戏进程内存时遇到问题:无法读取到指定地址的有效值 - 祈愿记录上传服务有效期至\n{0:yyyy-MM-dd HH:mm:ss} + 祈愿记录上传服务有效期至\n{0:yyyy.MM.dd HH:mm:ss} 无法找到缓存的元数据文件 diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/SpiralAbyssRecordPage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/SpiralAbyssRecordPage.xaml index a19e01e1..48c44e21 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/SpiralAbyssRecordPage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/SpiralAbyssRecordPage.xaml @@ -10,6 +10,7 @@ xmlns:shcb="using:Snap.Hutao.Control.Behavior" xmlns:shci="using:Snap.Hutao.Control.Image" xmlns:shcm="using:Snap.Hutao.Control.Markup" + xmlns:shct="using:Snap.Hutao.Control.Text" xmlns:shvc="using:Snap.Hutao.View.Control" xmlns:shvs="using:Snap.Hutao.ViewModel.SpiralAbyss" d:DataContext="{d:DesignInstance shvs:SpiralAbyssRecordViewModel}" @@ -25,7 +26,7 @@ Grid.Row="1" DisplayMode="Inline" IsPaneOpen="True" - OpenPaneLength="120" + OpenPaneLength="256" PaneBackground="Transparent" Visibility="{Binding SelectedView, Converter={StaticResource EmptyObjectToVisibilityConverter}}"> @@ -35,14 +36,29 @@ SelectedItem="{Binding SelectedView, Mode=TwoWay}"> - + + + + - + + + + + + - - - - - - - 0 - 0 - 0 - - - - - - - - - - + + + + + + + + + 0 + 0 + 0 + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + Margin="0,0,16,0" + VerticalAlignment="Center" + Text="{Binding Defeat.Value}"/> + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/Snap.Hutao/Snap.Hutao/ViewModel/SpiralAbyss/SpiralAbyssView.cs b/src/Snap.Hutao/Snap.Hutao/ViewModel/SpiralAbyss/SpiralAbyssView.cs index d6710711..b967568d 100644 --- a/src/Snap.Hutao/Snap.Hutao/ViewModel/SpiralAbyss/SpiralAbyssView.cs +++ b/src/Snap.Hutao/Snap.Hutao/ViewModel/SpiralAbyss/SpiralAbyssView.cs @@ -14,10 +14,10 @@ namespace Snap.Hutao.ViewModel.SpiralAbyss; /// 深渊视图 /// [HighQuality] -internal sealed class SpiralAbyssView : IEntityOnly, +internal sealed class SpiralAbyssView : IEntityOnly, IMappingFrom { - private readonly SpiralAbyssEntry entity; + private readonly SpiralAbyssEntry? entity; /// /// 构造一个新的深渊视图 @@ -25,16 +25,11 @@ internal sealed class SpiralAbyssView : IEntityOnly, /// 实体 /// Id角色映射 private SpiralAbyssView(SpiralAbyssEntry entity, SpiralAbyssMetadataContext context) + : this(context.IdScheduleMap[(uint)entity.ScheduleId], context) { this.entity = entity; - Web.Hoyolab.Takumi.GameRecord.SpiralAbyss.SpiralAbyss spiralAbyss = entity.SpiralAbyss; - - TowerSchedule towerSchedule = context.IdScheduleMap[(uint)entity.ScheduleId]; - TimeFormatted = $"{towerSchedule.Open:yyyy/MM/dd HH:mm:ss} - {towerSchedule.Close:yyyy/MM/dd HH:mm:ss}"; - - BlessingName = towerSchedule.BuffName; - Blessings = towerSchedule.Descriptions; + Web.Hoyolab.Takumi.GameRecord.SpiralAbyss.SpiralAbyss? spiralAbyss = entity.SpiralAbyss; TotalBattleTimes = spiralAbyss.TotalBattleTimes; TotalStar = spiralAbyss.TotalStar; MaxFloor = spiralAbyss.MaxFloor; @@ -47,7 +42,15 @@ internal sealed class SpiralAbyssView : IEntityOnly, Floors = spiralAbyss.Floors.Select(f => new FloorView(f, context.IdAvatarMap)).Reverse().ToList(); } - public SpiralAbyssEntry Entity { get => entity; } + private SpiralAbyssView(TowerSchedule towerSchedule, SpiralAbyssMetadataContext context) + { + TimeFormatted = $"{towerSchedule.Open:yyyy.MM.dd HH:mm} - {towerSchedule.Close:yyyy.MM.dd HH:mm}"; + + BlessingName = towerSchedule.BuffName; + Blessings = towerSchedule.Descriptions; + } + + public SpiralAbyssEntry? Entity { get => entity; } public string TimeFormatted { get; } @@ -68,12 +71,12 @@ internal sealed class SpiralAbyssView : IEntityOnly, /// /// 最深抵达 /// - public string MaxFloor { get; } + public string MaxFloor { get; } = default!; /// /// 出战次数 /// - public List Reveals { get; } + public List Reveals { get; } = default!; /// /// 击破次数 diff --git a/src/Snap.Hutao/Snap.Hutao/Web/Hutao/HutaoAsAService/Announcement.cs b/src/Snap.Hutao/Snap.Hutao/Web/Hutao/HutaoAsAService/Announcement.cs index 850142a3..197a39dc 100644 --- a/src/Snap.Hutao/Snap.Hutao/Web/Hutao/HutaoAsAService/Announcement.cs +++ b/src/Snap.Hutao/Snap.Hutao/Web/Hutao/HutaoAsAService/Announcement.cs @@ -23,7 +23,7 @@ internal sealed class Announcement : UploadAnnouncement /// public long LastUpdateTime { get; set; } - public string UpdateTimeFormatted { get => $"{DateTimeOffset.FromUnixTimeSeconds(LastUpdateTime).ToLocalTime():yyyy-MM-dd HH:mm:ss}"; } + public string UpdateTimeFormatted { get => $"{DateTimeOffset.FromUnixTimeSeconds(LastUpdateTime).ToLocalTime():yyyy.MM.dd HH:mm:ss}"; } public ICommand? DismissCommand { get; set; } } \ No newline at end of file