1
0
mirror of synced 2024-12-05 03:17:58 +01:00
TaikoLocalServer/TaikoWebUI/Pages/Song.razor

32 lines
1.0 KiB
Plaintext
Raw Normal View History

2024-03-10 04:48:26 +01:00
@page "/Users/{baid:int}/Songs/{songId:int}"
@using Blazored.LocalStorage
@using TaikoWebUI.Components.Song
2024-03-10 04:48:26 +01:00
@inject IGameDataService GameDataService
@inject HttpClient Client
2024-05-17 00:32:46 +02:00
@inject AuthService AuthService
2024-03-10 04:48:26 +01:00
@inject NavigationManager NavigationManager
@inject ILocalStorageService LocalStorage
2024-03-13 16:00:18 +01:00
2024-05-17 00:32:46 +02:00
@if (AuthService.LoginRequired && (!AuthService.IsLoggedIn || (AuthService.GetLoggedInBaid() != Baid && !AuthService.IsAdmin)))
2024-03-10 04:48:26 +01:00
{
2024-05-17 00:32:46 +02:00
NavigationManager.NavigateTo(AuthService.IsLoggedIn ? "/" : "/Login");
2024-03-10 04:48:26 +01:00
}
else
{
if (response is not null)
{
<MudBreadcrumbs Items="breadcrumbs" Class="p-0 mb-3"></MudBreadcrumbs>
2024-05-17 00:32:46 +02:00
<MudText Typo="Typo.h5">@songTitle</MudText>
<MudText Typo="Typo.body2">@songArtist</MudText>
2024-03-10 04:48:26 +01:00
<MudGrid Class="my-4 pb-10">
2024-03-10 05:49:47 +01:00
<MudItem xs="12">
2024-06-03 03:00:54 +02:00
<SongLeaderboardCard SongId="@SongId" Baid="@Baid" />
2024-03-10 05:49:47 +01:00
</MudItem>
2024-06-03 01:55:44 +02:00
<MudItem xs="12">
2024-06-03 03:00:54 +02:00
<PlayHistoryCard Items="@songHistoryData" />
2024-06-03 01:55:44 +02:00
</MudItem>
2024-03-10 04:48:26 +01:00
</MudGrid>
}
}