Merge remote-tracking branch 'origin/master'
# Conflicts: # TaikoWebUI/Pages/PlayResults.razor
@ -30,15 +30,33 @@
|
|||||||
@foreach (var genre in Enum.GetValues<SongGenre>())
|
@foreach (var genre in Enum.GetValues<SongGenre>())
|
||||||
{
|
{
|
||||||
<MudTabPanel Text="@genre.ToString()">
|
<MudTabPanel Text="@genre.ToString()">
|
||||||
<MudDataGrid Items="@response.SongBestData.Where(data => GameDataService.GetMusicGenreBySongId(data.SongId) == genre)">
|
<MudDataGrid Items="@response.SongBestData" ColumnResizeMode="ResizeMode.Container">
|
||||||
<Columns>
|
<Columns>
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.SongId)" Title="Song">
|
<Column T="SongBestData" Field="@nameof(SongBestData.SongId)" Title="Song" StickyLeft="true" Class="clm-row-large">
|
||||||
<CellTemplate>
|
<CellTemplate>
|
||||||
|
<MudGrid Justify="Justify.Center">
|
||||||
|
<MudItem xs="10">
|
||||||
|
<MudStack Spacing="0">
|
||||||
<MudText Typo="Typo.body2" Style="font-weight:bold">@GameDataService.GetMusicNameBySongId(context.Item.SongId)</MudText>
|
<MudText Typo="Typo.body2" Style="font-weight:bold">@GameDataService.GetMusicNameBySongId(context.Item.SongId)</MudText>
|
||||||
<MudText Typo="Typo.caption">@GameDataService.GetMusicArtistBySongId(context.Item.SongId)</MudText>
|
<MudText Typo="Typo.caption">@GameDataService.GetMusicArtistBySongId(context.Item.SongId)</MudText>
|
||||||
|
</MudStack>
|
||||||
|
</MudItem>
|
||||||
|
<MudItem xs="2">
|
||||||
|
<MudStack Justify="Justify.Center" AlignItems="AlignItems.End" Style="height:100%">
|
||||||
|
<MudToggleIconButton Toggled="@context.Item.IsFavorite"
|
||||||
|
ToggledChanged="@(async () => await OnFavoriteToggled(context.Item))"
|
||||||
|
Icon="@Icons.Material.Filled.FavoriteBorder" Color="@Color.Secondary"
|
||||||
|
Title="Add to favorites"
|
||||||
|
ToggledIcon="@Icons.Material.Filled.Favorite" ToggledColor="@Color.Secondary"
|
||||||
|
ToggledTitle="Remove from favorites"
|
||||||
|
Size="Size.Small"
|
||||||
|
ToggledSize="Size.Small" />
|
||||||
|
</MudStack>
|
||||||
|
</MudItem>
|
||||||
|
</MudGrid>
|
||||||
</CellTemplate>
|
</CellTemplate>
|
||||||
</Column>
|
</Column>
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.Difficulty)" Title="Difficulty">
|
<Column T="SongBestData" Field="@nameof(SongBestData.Difficulty)" Title="Course">
|
||||||
<CellTemplate>
|
<CellTemplate>
|
||||||
<MudTooltip Text="@(context.Item.Difficulty.ToString())" Arrow="true" Placement="Placement.Top">
|
<MudTooltip Text="@(context.Item.Difficulty.ToString())" Arrow="true" Placement="Placement.Top">
|
||||||
<img src="@($"/images/{context.Item.Difficulty}.png")" alt="@(context.Item.Difficulty)" style="@ICON_STYLE" />
|
<img src="@($"/images/{context.Item.Difficulty}.png")" alt="@(context.Item.Difficulty)" style="@ICON_STYLE" />
|
||||||
@ -53,24 +71,23 @@
|
|||||||
</MudTooltip>
|
</MudTooltip>
|
||||||
</CellTemplate>
|
</CellTemplate>
|
||||||
</Column>
|
</Column>
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.BestScoreRank)" Title="Best Rank"/>
|
<Column T="SongBestData" Field="@nameof(SongBestData.BestScoreRank)" Title="Best Rank">
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.BestRate)" Title="Best Rate"/>
|
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.GoodCount)" Title="Good"/>
|
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.OkCount)" Title="Ok"/>
|
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.MissCount)" Title="Miss"/>
|
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.ComboCount)" Title="Max Combo"/>
|
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.DrumrollCount)" Title="Drum Rolls"/>
|
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.HitCount)" Title="Hit"/>
|
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.IsFavorite)" Title="Favorite">
|
|
||||||
<CellTemplate>
|
<CellTemplate>
|
||||||
<MudToggleIconButton Toggled="@context.Item.IsFavorite"
|
@if (context.Item.BestScoreRank is not ScoreRank.None)
|
||||||
ToggledChanged="@(async () => await OnFavoriteToggled(context.Item))"
|
{
|
||||||
Icon="@Icons.Material.Filled.FavoriteBorder" Color="@Color.Secondary"
|
<MudTooltip Text="@(getRankText(context.Item.BestScoreRank))" Arrow="true" Placement="Placement.Top">
|
||||||
Title="Add to favorites"
|
<img src="@($"/images/rank_{context.Item.BestScoreRank}.png")" alt="@(context.Item.BestScoreRank)" style="@ICON_STYLE" />
|
||||||
ToggledIcon="@Icons.Material.Filled.Favorite" ToggledColor="@Color.Secondary"
|
</MudTooltip>
|
||||||
ToggledTitle="Remove from favorites"/>
|
}
|
||||||
</CellTemplate>
|
</CellTemplate>
|
||||||
</Column>
|
</Column>
|
||||||
|
<Column T="SongBestData" Field="@nameof(SongBestData.GoodCount)" Title="Good" Sortable="false"/>
|
||||||
|
<Column T="SongBestData" Field="@nameof(SongBestData.OkCount)" Title="Ok" Sortable="false" />
|
||||||
|
<Column T="SongBestData" Field="@nameof(SongBestData.MissCount)" Title="Bad" Sortable="false"/>
|
||||||
|
<Column T="SongBestData" Field="@nameof(SongBestData.DrumrollCount)" Title="Drum Roll" Sortable="false"/>
|
||||||
|
<Column T="SongBestData" Field="@nameof(SongBestData.ComboCount)" Title="Max Combo" Sortable="false" />
|
||||||
|
@*<Column T="SongBestData" Field="@nameof(SongBestData.HitCount)" Title="Hit" />*@
|
||||||
|
@*<Column T="SongBestData" Field="@nameof(SongBestData.BestRate)" Title="Best Rate"/>*@
|
||||||
</Columns>
|
</Columns>
|
||||||
<PagerContent>
|
<PagerContent>
|
||||||
<MudDataGridPager T="SongBestData"/>
|
<MudDataGridPager T="SongBestData"/>
|
||||||
@ -140,4 +157,20 @@
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string getRankText(ScoreRank rank)
|
||||||
|
{
|
||||||
|
return rank switch
|
||||||
|
{
|
||||||
|
ScoreRank.None => "None",
|
||||||
|
ScoreRank.White => "Stylish (White)",
|
||||||
|
ScoreRank.Bronze => "Stylish (Bronze)",
|
||||||
|
ScoreRank.Silver => "Stylish (Silver)",
|
||||||
|
ScoreRank.Gold => "Graceful (Gold)",
|
||||||
|
ScoreRank.Sakura => "Graceful (Sakura)",
|
||||||
|
ScoreRank.Purple => "Graceful (Purple)",
|
||||||
|
ScoreRank.Dondaful => "Top Class (Donderful)",
|
||||||
|
_ => ""
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
BIN
TaikoWebUI/wwwroot/images/rank_Bronze.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
TaikoWebUI/wwwroot/images/rank_Dondaful.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
TaikoWebUI/wwwroot/images/rank_Gold.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
TaikoWebUI/wwwroot/images/rank_Purple.png
Normal file
After Width: | Height: | Size: 20 KiB |
BIN
TaikoWebUI/wwwroot/images/rank_Sakura.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
TaikoWebUI/wwwroot/images/rank_Silver.png
Normal file
After Width: | Height: | Size: 16 KiB |
BIN
TaikoWebUI/wwwroot/images/rank_White.png
Normal file
After Width: | Height: | Size: 11 KiB |