1
0
mirror of synced 2024-12-12 14:51:08 +01:00
TaikoLocalServer/TaikoWebUI/Pages/Song.razor

29 lines
875 B
Plaintext
Raw Normal View History

2024-03-10 04:48:26 +01:00
@page "/Users/{baid:int}/Songs/{songId:int}"
@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
2024-05-17 00:32:46 +02:00
@inject IJSRuntime JsRuntime
2024-03-10 04:48:26 +01:00
2024-03-27 17:49:27 +01:00
@using TaikoWebUI.Components.Song;
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-05-17 00:32:46 +02:00
<PlayHistoryCard Items="@songHistoryData" />
2024-03-10 05:49:47 +01:00
</MudItem>
2024-03-10 04:48:26 +01:00
</MudGrid>
}
}