76 lines
3.1 KiB
Plaintext
76 lines
3.1 KiB
Plaintext
@page "/Users/{baid:int}/Songs/{songId:int}"
|
|
|
|
@inject IGameDataService GameDataService
|
|
@inject HttpClient Client
|
|
@inject LoginService LoginService
|
|
@inject NavigationManager NavigationManager
|
|
@inject IJSRuntime JSRuntime
|
|
|
|
@if (LoginService.LoginRequired && (!LoginService.IsLoggedIn || (LoginService.GetLoggedInUser().Baid != Baid && !LoginService.IsAdmin)))
|
|
{
|
|
if (!LoginService.IsLoggedIn)
|
|
{
|
|
NavigationManager.NavigateTo("/Login");
|
|
}
|
|
else
|
|
{
|
|
NavigationManager.NavigateTo("/");
|
|
}
|
|
}
|
|
else
|
|
{
|
|
if (response is not null)
|
|
{
|
|
<MudBreadcrumbs Items="breadcrumbs" Class="p-0 mb-3"></MudBreadcrumbs>
|
|
<MudText Typo="Typo.h5">@SongTitle</MudText>
|
|
<MudText Typo="Typo.body2">@SongArtist</MudText>
|
|
<MudGrid Class="my-4 pb-10">
|
|
<MudItem xs="12">
|
|
<MudCard Outlined="true" Elevation="0">
|
|
<MudCardHeader>
|
|
<MudText Typo="Typo.h6">Recent Plays</MudText>
|
|
</MudCardHeader>
|
|
|
|
@if (SongBestData is not null && SongBestData.RecentPlayData is not null && SongBestData.RecentPlayData.Count > 0)
|
|
{
|
|
<MudCardContent Class="p-0">
|
|
<MudTable Items="@SongBestData.RecentPlayData" Elevation="0" Striped="true">
|
|
<HeaderContent>
|
|
<MudTh>Play Time</MudTh>
|
|
<MudTh>Difficulty</MudTh>
|
|
<MudTh>Crown</MudTh>
|
|
<MudTh>Rank</MudTh>
|
|
<MudTh>Score</MudTh>
|
|
<MudTh>Good</MudTh>
|
|
<MudTh>Ok</MudTh>
|
|
<MudTh>Bad</MudTh>
|
|
<MudTh>Drumroll</MudTh>
|
|
<MudTh>Max Combo</MudTh>
|
|
</HeaderContent>
|
|
<RowTemplate>
|
|
<MudTd>@context.PlayTime</MudTd>
|
|
<MudTd>@context.Difficulty</MudTd>
|
|
<MudTd>@context.Crown</MudTd>
|
|
<MudTd>@context.ScoreRank</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="pb-8" Color="Color.Surface" Align="Align.Center">No recent play data.</MudText>
|
|
</MudCardContent>
|
|
}
|
|
</MudCard>
|
|
</MudItem>
|
|
</MudGrid>
|
|
}
|
|
}
|