1
0
mirror of synced 2025-01-30 03:47:28 +01:00

30 lines
916 B
Plaintext
Raw Normal View History

2024-03-09 22:48:26 -05:00
@page "/Users/{baid:int}/Songs/{songId:int}"
@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
@inject ILocalStorageService LocalStorage
2024-03-13 11:00:18 -04:00
2024-05-16 23:32:46 +01:00
@if (AuthService.LoginRequired && (!AuthService.IsLoggedIn || (AuthService.GetLoggedInBaid() != Baid && !AuthService.IsAdmin)))
2024-03-09 22:48:26 -05:00
{
2024-05-16 23:32:46 +01:00
NavigationManager.NavigateTo(AuthService.IsLoggedIn ? "/" : "/Login");
2024-03-09 22:48:26 -05:00
}
else
{
if (response is not null)
{
<MudBreadcrumbs Items="breadcrumbs" Class="p-0 mb-3"></MudBreadcrumbs>
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-05-16 23:32:46 +01:00
<PlayHistoryCard Items="@songHistoryData" />
2024-03-09 23:49:47 -05:00
</MudItem>
2024-03-09 22:48:26 -05:00
</MudGrid>
}
}