1
0
mirror of synced 2024-12-18 17:35:55 +01:00
TaikoLocalServer/TaikoWebUI/Pages/Song.razor

38 lines
1.2 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-08-13 17:07:39 +02:00
@inject BreadcrumbsStateContainer BreadcrumbsStateContainer
2024-03-13 16:00:18 +01:00
@if (response is null)
2024-03-10 04:48:26 +01: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-10 04:48:26 +01:00
}
else
{
@if (AuthService.LoginRequired && (!AuthService.IsLoggedIn || (AuthService.GetLoggedInBaid() != Baid && !AuthService.IsAdmin)))
{
NavigationManager.NavigateTo(AuthService.IsLoggedIn ? "/" : "/Login");
}
else
2024-03-10 04:48:26 +01:00
{
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>
}
}