1
0
mirror of synced 2024-12-04 10:57:59 +01:00
TaikoLocalServer/TaikoWebUI/Pages/Song.razor

37 lines
1011 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
@inject LoginService LoginService
@inject NavigationManager NavigationManager
@inject IJSRuntime JSRuntime
2024-03-13 16:00:18 +01:00
@using TaikoWebUI.Utilities;
2024-03-27 17:49:27 +01:00
@using TaikoWebUI.Components.Song;
2024-03-13 16:00:18 +01:00
2024-03-10 04:48:26 +01:00
@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">
2024-03-10 05:49:47 +01:00
<MudItem xs="12">
2024-03-13 16:23:22 +01:00
<PlayHistoryCard Items="@SongBestData?.RecentPlayData" />
2024-03-10 05:49:47 +01:00
</MudItem>
2024-03-10 04:48:26 +01:00
</MudGrid>
}
}