diff --git a/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml b/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml index 62875649..e0d5ca7d 100644 --- a/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml +++ b/src/Snap.Hutao/Snap.Hutao/View/Page/DailyNotePage.xaml @@ -108,6 +108,44 @@ Grid.Row="1" Margin="0,8,0,0" Spacing="6"> + + + + + + + + + + + + + diff --git a/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Takumi/GameRecord/DailyNote/ArchonQuestProgress.cs b/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Takumi/GameRecord/DailyNote/ArchonQuestProgress.cs index fd16627b..8308fd42 100644 --- a/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Takumi/GameRecord/DailyNote/ArchonQuestProgress.cs +++ b/src/Snap.Hutao/Snap.Hutao/Web/Hoyolab/Takumi/GameRecord/DailyNote/ArchonQuestProgress.cs @@ -5,9 +5,57 @@ namespace Snap.Hutao.Web.Hoyolab.Takumi.GameRecord.DailyNote; internal sealed class ArchonQuestProgress { + public List ArchonQuestIds { get; } = [ + 1001U, 1002U, 1003U, + 1101U, 1102U, 1103U, 1104U, + 1201U, 1202U, 1203U, 1204U, 1205U, 1206U, 1207U, + 1301U, 1302U, 1303U, 1304U, 1305U, 1306U, 1307U, 1308U, + 1401U, 1402U, 1403U, 1404U, 1405U + ]; + [JsonPropertyName("list")] public List List { get; set; } = default!; + public int ArchonQuestStatusValue + { + get + { + if (List.IsNullOrEmpty()) + { + return ArchonQuestIds.Count; + } + + return ArchonQuestIds.IndexOf(List.Single().Id); + } + } + + public string ArchonQuestStatusFormatted + { + get + { + if (List.IsNullOrEmpty()) + { + return SH.WebDailyNoteArchonQuestStatusFinished; + } + + return List.Single().Status.GetLocalizedDescription(); + } + } + + public string ArchonQuestChapterFormatted + { + get + { + if (List.IsNullOrEmpty()) + { + return string.Empty; + } + + ArchonQuest quest = List.Single(); + return $"{quest.ChapterNum} {quest.ChapterTitle}"; + } + } + [JsonPropertyName("is_open_archon_quest")] public bool IsOpenArchonQuest { get; set; }