1
0
mirror of synced 2025-01-30 03:47:28 +01:00
TaikoLocalServer/TaikoWebUI/Components/Song/PlayHistoryCard.razor
2024-03-27 12:49:27 -04:00

58 lines
2.6 KiB
Plaintext

@using TaikoWebUI.Utilities;
<MudCard Outlined="true" Elevation="0">
<MudCardHeader>
<MudText Typo="Typo.h6">Play History</MudText>
</MudCardHeader>
@if (Items != null && Items.Count > 0)
{
<MudCardContent Class="p-0">
<MudTable Items="Items" Elevation="0" Striped="true">
<HeaderContent>
<MudTh>@Localizer["Play Time"]</MudTh>
<MudTh>@Localizer["Difficulty"]</MudTh>
<MudTh>@Localizer["Crown"]</MudTh>
<MudTh>@Localizer["Rank"]</MudTh>
<MudTh>@Localizer["Score"]</MudTh>
<MudTh>@Localizer["Good"]</MudTh>
<MudTh>@Localizer["Ok"]</MudTh>
<MudTh>@Localizer["Bad"]</MudTh>
<MudTh>@Localizer["Drumroll"]</MudTh>
<MudTh>@Localizer["Max Combo"]</MudTh>
</HeaderContent>
<RowTemplate>
<MudTd>@context.PlayTime.ToString(Localizer["DateFormat"])</MudTd>
<MudTd>
<img src="@ScoreUtils.GetDifficultyIcon(context.Difficulty)" alt="@context.Difficulty" title="@context.Difficulty" style="@IconStyle" />
</MudTd>
<MudTd>
<img src="@($"/images/crown_{context.Crown}.png")" alt="@(ScoreUtils.GetCrownText(context.Crown))" title="@(ScoreUtils.GetCrownText(context.Crown))" style="@IconStyle" />
</MudTd>
<MudTd>
<img src="@($"/images/rank_{context.ScoreRank}.png")" alt="@(ScoreUtils.GetRankText(context.ScoreRank))" title="@(ScoreUtils.GetRankText(context.ScoreRank))" style="@IconStyle" />
</MudTd>
<MudTd>@context.Score</MudTd>
<MudTd>@context.GoodCount</MudTd>
<MudTd>@context.OkCount</MudTd>
<MudTd>@context.MissCount</MudTd>
<MudTd>@context.DrumrollCount</MudTd>
<MudTd>@context.ComboCount</MudTd>
</RowTemplate>
</MudTable>
</MudCardContent>
}
else
{
<MudCardContent>
<MudText Typo="Typo.body2" Class="pt-4 pb-8" Color="Color.Surface" Align="Align.Center">
@Localizer["No play history found."]
</MudText>
</MudCardContent>
}
</MudCard>
@code {
[Parameter] public List<SongPlayDatumDto> Items { get; set; } = new List<SongPlayDatumDto>();
private const string IconStyle = "width:25px; height:25px;";
}