Editing table styling, added search on highscores
This commit is contained in:
parent
2c0f43717b
commit
499312a02e
@ -2,6 +2,7 @@
|
|||||||
@inject Blazored.LocalStorage.ILocalStorageService LocalStorage
|
@inject Blazored.LocalStorage.ILocalStorageService LocalStorage
|
||||||
@inject AuthService AuthService
|
@inject AuthService AuthService
|
||||||
@inject BreadcrumbsStateContainer BreadcrumbsStateContainer
|
@inject BreadcrumbsStateContainer BreadcrumbsStateContainer
|
||||||
|
@inject IOptions<WebUiSettings> Settings
|
||||||
|
|
||||||
@using Microsoft.Extensions.Options;
|
@using Microsoft.Extensions.Options;
|
||||||
@using TaikoWebUI.Settings;
|
@using TaikoWebUI.Settings;
|
||||||
@ -29,7 +30,7 @@
|
|||||||
<NavMenu />
|
<NavMenu />
|
||||||
</MudDrawer>
|
</MudDrawer>
|
||||||
<MudMainContent>
|
<MudMainContent>
|
||||||
<MudContainer MaxWidth="MaxWidth.ExtraLarge" Class="my-8 pb-8">
|
<MudContainer MaxWidth=Settings.Value.MaxWidth Class="my-8 pb-8">
|
||||||
@Body
|
@Body
|
||||||
|
|
||||||
<MudScrollToTop>
|
<MudScrollToTop>
|
||||||
|
@ -27,7 +27,7 @@ else
|
|||||||
<MudGrid Class="my-4 pb-10">
|
<MudGrid Class="my-4 pb-10">
|
||||||
<MudItem xs="12">
|
<MudItem xs="12">
|
||||||
<MudPaper Elevation="0" Outlined="true">
|
<MudPaper Elevation="0" Outlined="true">
|
||||||
<MudTabs ActivePanelIndex="0" Rounded="true" Border="true" PanelClass="pa-8">
|
<MudTabs ActivePanelIndex="0" Rounded="true" Border="true" MinimumTabWidth="100px" PanelClass="pa-8">
|
||||||
@foreach (var danId in danMap.Keys)
|
@foreach (var danId in danMap.Keys)
|
||||||
{
|
{
|
||||||
var danData = danMap[danId];
|
var danData = danMap[danId];
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
<MudItem xs="12">
|
<MudItem xs="12">
|
||||||
<MudTabs Elevation="0" Border="true" Rounded="true" ApplyEffectsToContainer="true" Outlined="true" ActivePanelIndexChanged="@(async (index) => await OnTabChanged(index))" ActivePanelIndex="@selectedDifficultyTab">
|
<MudTabs Elevation="0" Border="true" MinimumTabWidth="100px" Rounded="true" ApplyEffectsToContainer="true" Outlined="true" ActivePanelIndexChanged="@(async (index) => await OnTabChanged(index))" ActivePanelIndex="@selectedDifficultyTab">
|
||||||
@foreach (var difficulty in Enum.GetValues<Difficulty>())
|
@foreach (var difficulty in Enum.GetValues<Difficulty>())
|
||||||
{
|
{
|
||||||
@if (difficulty is not Difficulty.None)
|
@if (difficulty is not Difficulty.None)
|
||||||
@ -35,99 +35,99 @@
|
|||||||
@if (songBestDataMap.TryGetValue(difficulty, out var value))
|
@if (songBestDataMap.TryGetValue(difficulty, out var value))
|
||||||
{
|
{
|
||||||
// Rows per page 25
|
// Rows per page 25
|
||||||
<MudTable Items="@value" Elevation="0" Striped="false" Outlined="true" RowsPerPage="25" Breakpoint=Breakpoint.None >
|
<MudTable Items="@value" Elevation="0" Striped="false" Outlined="true" RowsPerPage="25" Breakpoint=Breakpoint.None Filter="@FilterSongs">
|
||||||
|
<ToolBarContent>
|
||||||
|
<MudGrid Spacing="2">
|
||||||
|
<MudItem xs="12" md="8">
|
||||||
|
<MudTextField @bind-Value="Search"
|
||||||
|
Placeholder="@Localizer["Search by Title or Artist"]"
|
||||||
|
Variant="Variant.Outlined"
|
||||||
|
Clearable="true"
|
||||||
|
Immediate="true"
|
||||||
|
Margin="Margin.Dense"
|
||||||
|
Adornment="Adornment.Start"
|
||||||
|
AdornmentIcon="@Icons.Material.Filled.Search"
|
||||||
|
IconSize="Size.Medium" />
|
||||||
|
</MudItem>
|
||||||
|
<MudItem xs="12" md="4">
|
||||||
|
<MudSelect @bind-Value="GenreFilter" T="string" Label="@Localizer["Filter by Genre"]" Variant="Variant.Outlined" Margin="Margin.Dense" Clearable="true">
|
||||||
|
@foreach (var genre in Enum.GetValues(typeof(SongGenre)))
|
||||||
|
{
|
||||||
|
var genreValue = (SongGenre)genre;
|
||||||
|
<MudSelectItem Value="@genreValue.ToString()" Label="@Localizer[$"Key_{genreValue}"]">
|
||||||
|
@ScoreUtils.GetGenreTitle(genreValue)
|
||||||
|
</MudSelectItem>
|
||||||
|
}
|
||||||
|
</MudSelect>
|
||||||
|
</MudItem>
|
||||||
|
</MudGrid>
|
||||||
|
</ToolBarContent>
|
||||||
<HeaderContent>
|
<HeaderContent>
|
||||||
<MudTh>
|
<MudTh Style="width: 400px">
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => GameDataService.GetMusicNameBySongId(musicDetailDictionary, x.SongId, CultureInfo.CurrentCulture.ToString())">
|
<MudTableSortLabel T="SongBestData" SortBy="x => GameDataService.GetMusicNameBySongId(musicDetailDictionary, x.SongId, CultureInfo.CurrentCulture.ToString())">
|
||||||
<MudText>@Localizer["Song Name"]</MudText>
|
<MudText Typo="Typo.body2">@Localizer["Song Title / Artist"]</MudText>
|
||||||
</MudTableSortLabel>
|
|
||||||
</MudTh>
|
|
||||||
<MudTh>
|
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => GameDataService.GetMusicStarLevel(musicDetailDictionary, x.SongId, difficulty) * 1000000 + x.BestScore">
|
|
||||||
<MudText>@Localizer["Level"]</MudText>
|
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh>
|
</MudTh>
|
||||||
<MudTh>
|
<MudTh>
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => (int)x.Genre * 1000000 + x.BestScore">
|
<MudTableSortLabel T="SongBestData" SortBy="x => (int)x.Genre * 1000000 + x.BestScore">
|
||||||
<MudText>@Localizer["Genre"]</MudText>
|
<MudText Typo="Typo.body2">@Localizer["Genre"]</MudText>
|
||||||
|
</MudTableSortLabel>
|
||||||
|
</MudTh>
|
||||||
|
<MudTh>
|
||||||
|
<MudTableSortLabel T="SongBestData" SortBy="x => GameDataService.GetMusicStarLevel(musicDetailDictionary, x.SongId, difficulty) * 1000000 + x.BestScore">
|
||||||
|
<MudText Typo="Typo.body2">@Localizer["Level"]</MudText>
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh>
|
</MudTh>
|
||||||
<MudTh>
|
<MudTh>
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => x.BestScore">
|
<MudTableSortLabel T="SongBestData" SortBy="x => x.BestScore">
|
||||||
<MudText>@Localizer["Best Score"]</MudText>
|
<MudText Typo="Typo.body2">@Localizer["Best Score"]</MudText>
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh>
|
</MudTh>
|
||||||
<MudTh>
|
<MudTh>
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => (int)x.BestCrown * 1000000 + x.BestScore">
|
<MudTableSortLabel T="SongBestData" SortBy="x => (int)x.BestCrown * 1000000 + x.BestScore">
|
||||||
<MudText>@Localizer["Best Crown"]</MudText>
|
<MudText Typo="Typo.body2">@Localizer["Best Crown"]</MudText>
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh>
|
</MudTh>
|
||||||
<MudTh>
|
<MudTh>
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => (int)x.BestScoreRank * 1000000 + x.BestScore">
|
<MudTableSortLabel T="SongBestData" SortBy="x => (int)x.BestScoreRank * 1000000 + x.BestScore">
|
||||||
<MudText>@Localizer["Best Rank"]</MudText>
|
<MudText Typo="Typo.body2">@Localizer["Best Rank"]</MudText>
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh>
|
</MudTh>
|
||||||
<MudTh>
|
@* <MudTh>
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => x.GoodCount">
|
<MudTableSortLabel T="SongBestData" SortBy="x => x.GoodCount">
|
||||||
<MudText>@Localizer["Good"]</MudText>
|
<MudText Typo="Typo.body2">@Localizer["Good"]</MudText>
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh>
|
</MudTh>
|
||||||
<MudTh>
|
<MudTh>
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => x.OkCount">
|
<MudTableSortLabel T="SongBestData" SortBy="x => x.OkCount">
|
||||||
<MudText>@Localizer["OK"]</MudText>
|
<MudText Typo="Typo.body2">@Localizer["OK"]</MudText>
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh>
|
</MudTh>
|
||||||
<MudTh>
|
<MudTh>
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => x.MissCount">
|
<MudTableSortLabel T="SongBestData" SortBy="x => x.MissCount">
|
||||||
<MudText>@Localizer["Bad"]</MudText>
|
<MudText Typo="Typo.body2">@Localizer["Bad"]</MudText>
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh>
|
</MudTh>
|
||||||
<MudTh>
|
<MudTh>
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => x.DrumrollCount">
|
<MudTableSortLabel T="SongBestData" SortBy="x => x.DrumrollCount">
|
||||||
<MudText>@Localizer["Drumroll"]</MudText>
|
<MudText Typo="Typo.body2">@Localizer["Drumroll"]</MudText>
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh>
|
</MudTh>
|
||||||
<MudTh>
|
<MudTh>
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => x.ComboCount">
|
<MudTableSortLabel T="SongBestData" SortBy="x => x.ComboCount">
|
||||||
<MudText>@Localizer["MAX Combo"]</MudText>
|
<MudText Typo="Typo.body2">@Localizer["MAX Combo"]</MudText>
|
||||||
</MudTableSortLabel>
|
|
||||||
</MudTh>
|
|
||||||
<MudTh>
|
|
||||||
<MudTableSortLabel T="SongBestData" InitialDirection="SortDirection.Descending" SortBy="x => x.PlayTime">
|
|
||||||
<MudText>@Localizer["Played"]</MudText>
|
|
||||||
</MudTableSortLabel>
|
|
||||||
</MudTh>
|
|
||||||
@* <MudTh>
|
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => x.PlayCount">
|
|
||||||
<MudText>@Localizer["Total Credits Played"]</MudText>
|
|
||||||
</MudTableSortLabel>
|
|
||||||
</MudTh>
|
|
||||||
<MudTh>
|
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => x.ClearCount">
|
|
||||||
<MudText>@Localizer["Total Clears"]</MudText>
|
|
||||||
</MudTableSortLabel>
|
|
||||||
</MudTh>
|
|
||||||
<MudTh>
|
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => x.FullComboCount">
|
|
||||||
<MudText>@Localizer["Total Full Combos"]</MudText>
|
|
||||||
</MudTableSortLabel>
|
|
||||||
</MudTh>
|
|
||||||
<MudTh>
|
|
||||||
<MudTableSortLabel T="SongBestData" SortBy="x => x.PerfectCount">
|
|
||||||
<MudText>@Localizer["Total Donderful Combos"]</MudText>
|
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh> *@
|
</MudTh> *@
|
||||||
|
<MudTh>
|
||||||
|
<MudTableSortLabel T="SongBestData" InitialDirection="SortDirection.Descending" SortBy="x => x.PlayTime">
|
||||||
|
<MudText Typo="Typo.body2">@Localizer["Played"]</MudText>
|
||||||
|
</MudTableSortLabel>
|
||||||
|
</MudTh>
|
||||||
</HeaderContent>
|
</HeaderContent>
|
||||||
<RowTemplate>
|
<RowTemplate>
|
||||||
<MudTd Style="text-align: initial !important;">
|
<MudTd Style="text-align: initial !important;">
|
||||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||||
<div style="width:400px">
|
<div>
|
||||||
<a href="@($"/Users/{Baid}/Songs/{context.SongId}")">
|
|
||||||
<MudText Typo="Typo.body2" Style="font-weight:bold">@context.MusicName</MudText>
|
|
||||||
<MudText Typo="Typo.caption">@context.MusicArtist</MudText>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
@* <div>
|
|
||||||
<MudToggleIconButton Toggled="@context.IsFavorite"
|
<MudToggleIconButton Toggled="@context.IsFavorite"
|
||||||
ToggledChanged="@(async () => await OnFavoriteToggled(context))"
|
ToggledChanged="@(async () => await OnFavoriteToggled(context))"
|
||||||
Icon="@Icons.Material.Filled.FavoriteBorder" Color="@Color.Secondary"
|
Icon="@Icons.Material.Filled.FavoriteBorder" Color="@Color.Secondary"
|
||||||
@ -135,9 +135,21 @@
|
|||||||
Size="Size.Small"
|
Size="Size.Small"
|
||||||
ToggledSize="Size.Small"
|
ToggledSize="Size.Small"
|
||||||
Title="Add to favorites" ToggledTitle="Remove from favorites" />
|
Title="Add to favorites" ToggledTitle="Remove from favorites" />
|
||||||
</div> *@
|
</div>
|
||||||
|
<div style="width:400px">
|
||||||
|
<a href="@($"/Users/{Baid}/Songs/{context.SongId}")">
|
||||||
|
<MudText Typo="Typo.body2" Style="font-weight:bold">@context.MusicName</MudText>
|
||||||
|
<MudText Typo="Typo.caption">@context.MusicArtist</MudText>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</MudStack>
|
</MudStack>
|
||||||
</MudTd>
|
</MudTd>
|
||||||
|
<MudTd Style="width: 150px;">
|
||||||
|
<MudChip Style="@ScoreUtils.GetGenreStyle(context.Genre)"
|
||||||
|
Size="Size.Small">
|
||||||
|
@ScoreUtils.GetGenreTitle(context.Genre)
|
||||||
|
</MudChip>
|
||||||
|
</MudTd>
|
||||||
<MudTd>
|
<MudTd>
|
||||||
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
||||||
<MudIcon Icon="@Icons.Material.Filled.Star" Size="Size.Small" />
|
<MudIcon Icon="@Icons.Material.Filled.Star" Size="Size.Small" />
|
||||||
@ -145,13 +157,7 @@
|
|||||||
</MudStack>
|
</MudStack>
|
||||||
</MudTd>
|
</MudTd>
|
||||||
<MudTd>
|
<MudTd>
|
||||||
<MudChip Style="@ScoreUtils.GetGenreStyle(context.Genre)"
|
<MudText Typo="Typo.body2">@context.BestScore</MudText>
|
||||||
Size="Size.Small">
|
|
||||||
@ScoreUtils.GetGenreTitle(context.Genre)
|
|
||||||
</MudChip>
|
|
||||||
</MudTd>
|
|
||||||
<MudTd>
|
|
||||||
<MudText>@context.BestScore</MudText>
|
|
||||||
</MudTd>
|
</MudTd>
|
||||||
<MudTd>
|
<MudTd>
|
||||||
<img src="@($"/images/crown_{context.BestCrown}.webp")" alt="@(ScoreUtils.GetCrownText(context.BestCrown))" title="@(ScoreUtils.GetCrownText(context.BestCrown))" style="@Constants.ICON_STYLE" />
|
<img src="@($"/images/crown_{context.BestCrown}.webp")" alt="@(ScoreUtils.GetCrownText(context.BestCrown))" title="@(ScoreUtils.GetCrownText(context.BestCrown))" style="@Constants.ICON_STYLE" />
|
||||||
@ -162,36 +168,24 @@
|
|||||||
<img src="@($"/images/rank_{context.BestScoreRank}.webp")" alt="@(ScoreUtils.GetRankText(context.BestScoreRank))" title="@(ScoreUtils.GetRankText(context.BestScoreRank))" style="@Constants.ICON_STYLE" />
|
<img src="@($"/images/rank_{context.BestScoreRank}.webp")" alt="@(ScoreUtils.GetRankText(context.BestScoreRank))" title="@(ScoreUtils.GetRankText(context.BestScoreRank))" style="@Constants.ICON_STYLE" />
|
||||||
}
|
}
|
||||||
</MudTd>
|
</MudTd>
|
||||||
<MudTd>
|
@* <MudTd>
|
||||||
<MudText>@context.GoodCount</MudText>
|
<MudText Typo="Typo.body2">@context.GoodCount</MudText>
|
||||||
</MudTd>
|
</MudTd>
|
||||||
<MudTd>
|
<MudTd>
|
||||||
<MudText>@context.OkCount</MudText>
|
<MudText Typo="Typo.body2">@context.OkCount</MudText>
|
||||||
</MudTd>
|
</MudTd>
|
||||||
<MudTd>
|
<MudTd>
|
||||||
<MudText>@context.MissCount</MudText>
|
<MudText Typo="Typo.body2">@context.MissCount</MudText>
|
||||||
</MudTd>
|
</MudTd>
|
||||||
<MudTd>
|
<MudTd>
|
||||||
<MudText>@context.DrumrollCount</MudText>
|
<MudText Typo="Typo.body2">@context.DrumrollCount</MudText>
|
||||||
</MudTd>
|
</MudTd>
|
||||||
<MudTd>
|
<MudTd>
|
||||||
<MudText>@context.ComboCount</MudText>
|
<MudText Typo="Typo.body2">@context.ComboCount</MudText>
|
||||||
</MudTd>
|
|
||||||
<MudTd>
|
|
||||||
<MudText>@context.PlayTime</MudText>
|
|
||||||
</MudTd>
|
|
||||||
@* <MudTd>
|
|
||||||
<MudText>@context.PlayCount</MudText>
|
|
||||||
</MudTd>
|
|
||||||
<MudTd>
|
|
||||||
<MudText>@context.ClearCount</MudText>
|
|
||||||
</MudTd>
|
|
||||||
<MudTd>
|
|
||||||
<MudText>@context.FullComboCount</MudText>
|
|
||||||
</MudTd>
|
|
||||||
<MudTd>
|
|
||||||
<MudText>@context.PerfectCount</MudText>
|
|
||||||
</MudTd> *@
|
</MudTd> *@
|
||||||
|
<MudTd>
|
||||||
|
<MudText Typo="Typo.body2">@context.PlayTime</MudText>
|
||||||
|
</MudTd>
|
||||||
</RowTemplate>
|
</RowTemplate>
|
||||||
<PagerContent>
|
<PagerContent>
|
||||||
<MudTablePager RowsPerPageString=@Localizer["Rows Per Page:"] />
|
<MudTablePager RowsPerPageString=@Localizer["Rows Per Page:"] />
|
||||||
|
@ -11,6 +11,9 @@ public partial class HighScores
|
|||||||
private int selectedDifficultyTab;
|
private int selectedDifficultyTab;
|
||||||
private Dictionary<uint, MusicDetail> musicDetailDictionary = new();
|
private Dictionary<uint, MusicDetail> musicDetailDictionary = new();
|
||||||
|
|
||||||
|
private string Search { get; set; } = string.Empty;
|
||||||
|
private string GenreFilter { get; set; } = string.Empty;
|
||||||
|
|
||||||
protected override async Task OnInitializedAsync()
|
protected override async Task OnInitializedAsync()
|
||||||
{
|
{
|
||||||
await base.OnInitializedAsync();
|
await base.OnInitializedAsync();
|
||||||
@ -90,4 +93,29 @@ public partial class HighScores
|
|||||||
selectedDifficultyTab = index;
|
selectedDifficultyTab = index;
|
||||||
await LocalStorage.SetItemAsync($"highScoresTab", selectedDifficultyTab);
|
await LocalStorage.SetItemAsync($"highScoresTab", selectedDifficultyTab);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool FilterSongs(SongBestData songData)
|
||||||
|
{
|
||||||
|
var stringsToCheck = new List<string>
|
||||||
|
{
|
||||||
|
songData.MusicName,
|
||||||
|
songData.MusicArtist,
|
||||||
|
songData.BestScore.ToString(),
|
||||||
|
songData.PlayTime.ToString(),
|
||||||
|
};
|
||||||
|
|
||||||
|
if (songData.IsFavorite) stringsToCheck.Add("Favorite");
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(Search) && !stringsToCheck.Any(s => s.Contains(Search, StringComparison.OrdinalIgnoreCase)))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrEmpty(GenreFilter) && songData.Genre != Enum.Parse<SongGenre>(GenreFilter))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,10 +69,10 @@
|
|||||||
<ChildRowContent>
|
<ChildRowContent>
|
||||||
<MudTable Items="@context" T="SongHistoryData" Context="songHistoryData" Elevation="0" Striped="false" Hover="false" ReadOnly="true" Outlined="true" Class="mb-8" Breakpoint=Breakpoint.None>
|
<MudTable Items="@context" T="SongHistoryData" Context="songHistoryData" Elevation="0" Striped="false" Hover="false" ReadOnly="true" Outlined="true" Class="mb-8" Breakpoint=Breakpoint.None>
|
||||||
<HeaderContent>
|
<HeaderContent>
|
||||||
|
<MudTh Style="width:400px">@Localizer["Song Title / Artist"]</MudTh>
|
||||||
|
<MudTh>@Localizer["Genre"]</MudTh>
|
||||||
<MudTh>@Localizer["Difficulty"]</MudTh>
|
<MudTh>@Localizer["Difficulty"]</MudTh>
|
||||||
<MudTh>@Localizer["Level"]</MudTh>
|
<MudTh>@Localizer["Level"]</MudTh>
|
||||||
<MudTh Style="width:500px">@Localizer["Song Name"]</MudTh>
|
|
||||||
<MudTh>@Localizer["Genre"]</MudTh>
|
|
||||||
<MudTh>@Localizer["Score"]</MudTh>
|
<MudTh>@Localizer["Score"]</MudTh>
|
||||||
<MudTh>@Localizer["Crown"]</MudTh>
|
<MudTh>@Localizer["Crown"]</MudTh>
|
||||||
<MudTh>@Localizer["Rank"]</MudTh>
|
<MudTh>@Localizer["Rank"]</MudTh>
|
||||||
@ -83,20 +83,10 @@
|
|||||||
<MudTh>@Localizer["MAX Combo"]</MudTh>
|
<MudTh>@Localizer["MAX Combo"]</MudTh>
|
||||||
</HeaderContent>
|
</HeaderContent>
|
||||||
<RowTemplate>
|
<RowTemplate>
|
||||||
@* Difficulty rating *@
|
|
||||||
<MudTd DataLabel="Difficulty" Style="text-align:center"><MudIcon Style=@IconStyle Icon="@GetDifficultyIcon(songHistoryData.Difficulty)" /></MudTd>
|
|
||||||
@* Star rating *@
|
|
||||||
<MudTd DataLabel="Stars" Style="text-align:center">
|
|
||||||
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
|
||||||
<MudIcon Icon="@Icons.Material.Filled.Star" Size="Size.Small" />
|
|
||||||
<MudText Typo="Typo.caption" Style="line-height:1;margin-top:2px;margin-right:2px;">@songHistoryData.Stars</MudText>
|
|
||||||
</MudStack>
|
|
||||||
</MudTd>
|
|
||||||
|
|
||||||
@* Song title *@
|
@* Song title *@
|
||||||
<MudTd DataLabel="Song" Style="text-align: initial !important;">
|
<MudTd DataLabel="Song" Style="text-align: initial !important;">
|
||||||
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
|
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center" Justify="Justify.SpaceBetween">
|
||||||
<div>
|
<div style="width:400px">
|
||||||
<a href="@($"/Users/{Baid}/Songs/{songHistoryData.SongId}")">
|
<a href="@($"/Users/{Baid}/Songs/{songHistoryData.SongId}")">
|
||||||
<MudText Typo="Typo.body2" Style="font-weight:bold">@songHistoryData.MusicName</MudText>
|
<MudText Typo="Typo.body2" Style="font-weight:bold">@songHistoryData.MusicName</MudText>
|
||||||
<MudText Typo="Typo.caption">@songHistoryData.MusicArtist</MudText>
|
<MudText Typo="Typo.caption">@songHistoryData.MusicArtist</MudText>
|
||||||
@ -106,10 +96,21 @@
|
|||||||
</MudTd>
|
</MudTd>
|
||||||
|
|
||||||
@* Genre display *@
|
@* Genre display *@
|
||||||
<MudTd DataLabel="Genre">
|
<MudTd DataLabel="Genre" Style="width: 150px;">
|
||||||
<MudChip Style=@GetGenreStyle(songHistoryData.Genre) Size="Size.Small">@GetGenreTitle(songHistoryData.Genre)</MudChip>
|
<MudChip Style=@GetGenreStyle(songHistoryData.Genre) Size="Size.Small">@GetGenreTitle(songHistoryData.Genre)</MudChip>
|
||||||
</MudTd>
|
</MudTd>
|
||||||
|
|
||||||
|
@* Difficulty rating *@
|
||||||
|
<MudTd DataLabel="Difficulty" Style="text-align:center"><MudIcon Style=@IconStyle Icon="@GetDifficultyIcon(songHistoryData.Difficulty)" /></MudTd>
|
||||||
|
|
||||||
|
@* Star rating *@
|
||||||
|
<MudTd DataLabel="Stars" Style="text-align:center">
|
||||||
|
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
||||||
|
<MudIcon Icon="@Icons.Material.Filled.Star" Size="Size.Small" />
|
||||||
|
<MudText Typo="Typo.caption" Style="line-height:1;margin-top:2px;margin-right:2px;">@songHistoryData.Stars</MudText>
|
||||||
|
</MudStack>
|
||||||
|
</MudTd>
|
||||||
|
|
||||||
<MudTd>@(songHistoryData.Score)</MudTd>
|
<MudTd>@(songHistoryData.Score)</MudTd>
|
||||||
<MudTd Style="text-align:center"><img src="@($"/images/crown_{songHistoryData.Crown}.webp")" alt="@(GetCrownText(songHistoryData.Crown))" title="@(GetCrownText(songHistoryData.Crown))" style=@IconStyle /></MudTd>
|
<MudTd Style="text-align:center"><img src="@($"/images/crown_{songHistoryData.Crown}.webp")" alt="@(GetCrownText(songHistoryData.Crown))" title="@(GetCrownText(songHistoryData.Crown))" style=@IconStyle /></MudTd>
|
||||||
<MudTd Style="text-align:center">
|
<MudTd Style="text-align:center">
|
||||||
|
@ -54,12 +54,12 @@
|
|||||||
</MudGrid>
|
</MudGrid>
|
||||||
</ToolBarContent>
|
</ToolBarContent>
|
||||||
<HeaderContent>
|
<HeaderContent>
|
||||||
<MudTh>
|
<MudTh Style="width: 400px">
|
||||||
<MudTableSortLabel T="MusicDetail" SortBy="context => GameDataService.GetMusicNameBySongId(musicDetailDictionary, context.SongId, SongNameLanguage)">
|
<MudTableSortLabel T="MusicDetail" SortBy="context => GameDataService.GetMusicNameBySongId(musicDetailDictionary, context.SongId, SongNameLanguage)">
|
||||||
@Localizer["Song Title / Artist"]
|
@Localizer["Song Title / Artist"]
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
</MudTh>
|
</MudTh>
|
||||||
<MudTh>
|
<MudTh Style="width: 150px;">
|
||||||
<MudTableSortLabel T="MusicDetail" SortBy="context => context.Genre">
|
<MudTableSortLabel T="MusicDetail" SortBy="context => context.Genre">
|
||||||
@Localizer["Genre"]
|
@Localizer["Genre"]
|
||||||
</MudTableSortLabel>
|
</MudTableSortLabel>
|
||||||
@ -77,18 +77,8 @@
|
|||||||
}
|
}
|
||||||
</HeaderContent>
|
</HeaderContent>
|
||||||
<RowTemplate>
|
<RowTemplate>
|
||||||
<MudTd Style="width:400px; text-align: initial !important;">
|
<MudTd Style="text-align: initial !important;">
|
||||||
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
||||||
<div>
|
|
||||||
<a href="@($"/Users/{Baid}/Songs/{context.SongId}")">
|
|
||||||
<MudText Typo="Typo.body2" Style="font-weight:bold">
|
|
||||||
@GameDataService.GetMusicNameBySongId(musicDetailDictionary, context.SongId, SongNameLanguage)
|
|
||||||
</MudText>
|
|
||||||
<MudText Typo="Typo.caption">
|
|
||||||
@GameDataService.GetMusicArtistBySongId(musicDetailDictionary, context.SongId, SongNameLanguage)
|
|
||||||
</MudText>
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<MudToggleIconButton Toggled="@context.IsFavorite"
|
<MudToggleIconButton Toggled="@context.IsFavorite"
|
||||||
ToggledChanged="@(async () => await OnFavoriteToggled(context))"
|
ToggledChanged="@(async () => await OnFavoriteToggled(context))"
|
||||||
@ -98,6 +88,12 @@
|
|||||||
ToggledSize="Size.Small"
|
ToggledSize="Size.Small"
|
||||||
Title="Add to favorites" ToggledTitle="Remove from favorites" />
|
Title="Add to favorites" ToggledTitle="Remove from favorites" />
|
||||||
</div>
|
</div>
|
||||||
|
<div style="width:400px">
|
||||||
|
<a href="@($"/Users/{Baid}/Songs/{context.SongId}")">
|
||||||
|
<MudText Typo="Typo.body2" Style="font-weight:bold">@GameDataService.GetMusicNameBySongId(musicDetailDictionary, context.SongId, SongNameLanguage)</MudText>
|
||||||
|
<MudText Typo="Typo.caption">@GameDataService.GetMusicArtistBySongId(musicDetailDictionary, context.SongId, SongNameLanguage)</MudText>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</MudStack>
|
</MudStack>
|
||||||
</MudTd>
|
</MudTd>
|
||||||
<MudTd>
|
<MudTd>
|
||||||
@ -113,7 +109,7 @@
|
|||||||
<MudTd>
|
<MudTd>
|
||||||
@if (starLevel > 0)
|
@if (starLevel > 0)
|
||||||
{
|
{
|
||||||
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
<MudStack Style="display: inline-flex !important;" Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
||||||
<MudIcon Icon="@Icons.Material.Filled.Star" Size="Size.Small" />
|
<MudIcon Icon="@Icons.Material.Filled.Star" Size="Size.Small" />
|
||||||
<MudText Typo="Typo.caption" Style="line-height:1;margin-top:2px;margin-right:2px;">@starLevel</MudText>
|
<MudText Typo="Typo.caption" Style="line-height:1;margin-top:2px;margin-right:2px;">@starLevel</MudText>
|
||||||
</MudStack>
|
</MudStack>
|
||||||
|
@ -10,6 +10,8 @@ public class WebUiSettings
|
|||||||
public bool AllowUserDelete { get; set; }
|
public bool AllowUserDelete { get; set; }
|
||||||
public bool AllowFreeProfileEditing { get; set; }
|
public bool AllowFreeProfileEditing { get; set; }
|
||||||
|
|
||||||
|
public MaxWidth MaxWidth { get; set; }
|
||||||
|
|
||||||
public SongLeaderboardSettings SongLeaderboardSettings { get; set; } = new SongLeaderboardSettings();
|
public SongLeaderboardSettings SongLeaderboardSettings { get; set; } = new SongLeaderboardSettings();
|
||||||
public Language[] SupportedLanguages { get; set; } = Array.Empty<Language>();
|
public Language[] SupportedLanguages { get; set; } = Array.Empty<Language>();
|
||||||
}
|
}
|
||||||
|
@ -318,6 +318,13 @@ tr.is-current-user p {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media only screen and (max-width: 599px) {
|
||||||
|
.mud-button-root {
|
||||||
|
padding-left: 4px;
|
||||||
|
padding-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.mud-breadcrumb-item {
|
.mud-breadcrumb-item {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user