32 lines
1019 B
Plaintext
32 lines
1019 B
Plaintext
@page "/Users/{baid:int}/Songs/{songId:int}"
|
|
|
|
@using Blazored.LocalStorage
|
|
@using TaikoWebUI.Components.Song
|
|
@inject IGameDataService GameDataService
|
|
@inject HttpClient Client
|
|
@inject AuthService AuthService
|
|
@inject NavigationManager NavigationManager
|
|
@inject ILocalStorageService LocalStorage
|
|
@inject BreadcrumbsStateContainer BreadcrumbsStateContainer
|
|
|
|
@if (AuthService.LoginRequired && (!AuthService.IsLoggedIn || (AuthService.GetLoggedInBaid() != Baid && !AuthService.IsAdmin)))
|
|
{
|
|
NavigationManager.NavigateTo(AuthService.IsLoggedIn ? "/" : "/Login");
|
|
}
|
|
else
|
|
{
|
|
if (response is not null)
|
|
{
|
|
<MudText Typo="Typo.h5">@songTitle</MudText>
|
|
<MudText Typo="Typo.body2">@songArtist</MudText>
|
|
<MudGrid Class="my-4 pb-10">
|
|
<MudItem xs="12">
|
|
<SongLeaderboardCard SongId="@SongId" Baid="@Baid" />
|
|
</MudItem>
|
|
<MudItem xs="12">
|
|
<PlayHistoryCard Items="@songHistoryData" />
|
|
</MudItem>
|
|
</MudGrid>
|
|
}
|
|
}
|