2024-03-09 22:48:26 -05:00
|
|
|
@page "/Users/{baid:int}/Songs/{songId:int}"
|
|
|
|
|
2024-05-26 23:06:51 +01:00
|
|
|
@using Blazored.LocalStorage
|
|
|
|
@using TaikoWebUI.Components.Song
|
2024-03-09 22:48:26 -05:00
|
|
|
@inject IGameDataService GameDataService
|
|
|
|
@inject HttpClient Client
|
2024-05-16 23:32:46 +01:00
|
|
|
@inject AuthService AuthService
|
2024-03-09 22:48:26 -05:00
|
|
|
@inject NavigationManager NavigationManager
|
2024-05-26 23:06:51 +01:00
|
|
|
@inject ILocalStorageService LocalStorage
|
2024-08-13 17:07:39 +02:00
|
|
|
@inject BreadcrumbsStateContainer BreadcrumbsStateContainer
|
2024-03-13 11:00:18 -04:00
|
|
|
|
2024-08-13 17:14:26 +02:00
|
|
|
@if (response is null)
|
2024-03-09 22:48:26 -05:00
|
|
|
{
|
2024-08-13 17:14:26 +02:00
|
|
|
<MudContainer Style="display:flex;margin:50px 0;align-items:center;justify-content:center;">
|
|
|
|
<MudProgressCircular Indeterminate="true" Size="Size.Large" Color="Color.Primary" />
|
|
|
|
</MudContainer>
|
2024-03-09 22:48:26 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2024-08-13 17:14:26 +02:00
|
|
|
@if (AuthService.LoginRequired && (!AuthService.IsLoggedIn || (AuthService.GetLoggedInBaid() != Baid && !AuthService.IsAdmin)))
|
|
|
|
{
|
|
|
|
NavigationManager.NavigateTo(AuthService.IsLoggedIn ? "/" : "/Login");
|
|
|
|
}
|
|
|
|
else
|
2024-03-09 22:48:26 -05:00
|
|
|
{
|
2024-05-16 23:32:46 +01:00
|
|
|
<MudText Typo="Typo.h5">@songTitle</MudText>
|
|
|
|
<MudText Typo="Typo.body2">@songArtist</MudText>
|
2024-03-09 22:48:26 -05:00
|
|
|
<MudGrid Class="my-4 pb-10">
|
2024-03-09 23:49:47 -05:00
|
|
|
<MudItem xs="12">
|
2024-06-02 21:00:54 -04:00
|
|
|
<SongLeaderboardCard SongId="@SongId" Baid="@Baid" />
|
2024-03-09 23:49:47 -05:00
|
|
|
</MudItem>
|
2024-06-02 19:55:44 -04:00
|
|
|
<MudItem xs="12">
|
2024-06-02 21:00:54 -04:00
|
|
|
<PlayHistoryCard Items="@songHistoryData" />
|
2024-06-02 19:55:44 -04:00
|
|
|
</MudItem>
|
2024-03-09 22:48:26 -05:00
|
|
|
</MudGrid>
|
|
|
|
}
|
|
|
|
}
|