mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
Compare commits
1 Commits
feat/unloc
...
feat/daily
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8e2694d4b1 |
@@ -108,6 +108,44 @@
|
||||
Grid.Row="1"
|
||||
Margin="0,8,0,0"
|
||||
Spacing="6">
|
||||
<Grid Style="{ThemeResource GridCardStyle}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
<ColumnDefinition/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<ProgressBar
|
||||
Grid.ColumnSpan="2"
|
||||
Height="40"
|
||||
MinHeight="48"
|
||||
Background="{x:Null}"
|
||||
CornerRadius="{ThemeResource ControlCornerRadius}"
|
||||
Maximum="{Binding DailyNote.ArchonQuestProgress.ArchonQuestIds.Count, Mode=OneWay}"
|
||||
Opacity="{StaticResource LargeBackgroundProgressBarOpacity}"
|
||||
Value="{Binding DailyNote.ArchonQuestProgress.ArchonQuestStatusValue, Mode=OneWay}"/>
|
||||
<shci:CachedImage
|
||||
Grid.Column="0"
|
||||
Margin="4"
|
||||
VerticalAlignment="Center"
|
||||
shch:FrameworkElementHelper.SquareLength="32"
|
||||
Source="{StaticResource UI_ItemIcon_210}"/>
|
||||
<!-- TODO ICON -->
|
||||
<StackPanel
|
||||
Grid.Column="1"
|
||||
Margin="8,0,0,0"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock
|
||||
Style="{StaticResource SubtitleTextBlockStyle}"
|
||||
Text="{Binding DailyNote.ArchonQuestProgress.ArchonQuestStatusFormatted, Mode=OneWay}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="NoWrap"/>
|
||||
<TextBlock
|
||||
Opacity="0.6"
|
||||
Style="{StaticResource CaptionTextBlockStyle}"
|
||||
Text="{Binding DailyNote.ArchonQuestProgress.ArchonQuestChapterFormatted, Mode=OneWay}"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextWrapping="NoWrap"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<Grid Style="{ThemeResource GridCardStyle}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="auto"/>
|
||||
|
||||
@@ -5,9 +5,57 @@ namespace Snap.Hutao.Web.Hoyolab.Takumi.GameRecord.DailyNote;
|
||||
|
||||
internal sealed class ArchonQuestProgress
|
||||
{
|
||||
public List<uint> 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<ArchonQuest> 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; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user