@inject IGameDataService GameDataService
@inject HttpClient Client
@inject LoginService LoginService
@inject IJSRuntime JSRuntime
@inject NavigationManager NavigationManager
@using TaikoWebUI.Utilities;
@using TaikoWebUI.Shared.Models;
@using SharedProject.Enums;
@page "/Users/{baid:int}/Songs"
@Localizer["Song List"]
@if (response is null)
{
}
else
{
@if (LoginService.LoginRequired && (!LoginService.IsLoggedIn || (LoginService.GetLoggedInUser().Baid != Baid && !LoginService.IsAdmin)))
{
if (!LoginService.IsLoggedIn)
{
NavigationManager.NavigateTo("/Login");
}
else
{
NavigationManager.NavigateTo("/");
}
}
else
{
@foreach (var genre in Enum.GetValues(typeof(SongGenre)))
{
var genreValue = (SongGenre)genre;
@ScoreUtils.GetGenreTitle(genreValue)
}
@Localizer["Song Title / Artist"]
@Localizer["Genre"]
@foreach (var difficulty in Enum.GetValues())
{
@if (difficulty is not Difficulty.None)
{
}
}
@ScoreUtils.GetGenreTitle(context.Genre)
@foreach (var difficulty in Enum.GetValues())
{
@if (difficulty is not Difficulty.None)
{
var starLevel = GameDataService.GetMusicStarLevel(context.SongId, difficulty);
@if (starLevel > 0)
{
@starLevel
}
else
{
-
}
}
}
}
}