2022-09-11 18:28:12 +02:00
|
|
|
@inject IGameDataService GameDataService
|
2022-09-09 14:31:45 +02:00
|
|
|
@inject HttpClient Client
|
|
|
|
|
2022-09-10 23:56:48 +02:00
|
|
|
@page "/Cards/{baid:int}/TaikoMode"
|
2022-09-09 14:31:45 +02:00
|
|
|
|
2022-09-10 06:56:53 +02:00
|
|
|
<MudBreadcrumbs Items="breadcrumbs" Class="px-0"></MudBreadcrumbs>
|
|
|
|
|
2022-09-10 21:58:06 +02:00
|
|
|
<h1>Taiko Mode</h1>
|
2022-09-10 06:56:53 +02:00
|
|
|
<MudText Typo="Typo.caption">Card: @Baid</MudText>
|
|
|
|
|
|
|
|
<MudGrid Class="my-8">
|
2022-09-10 17:45:18 +02:00
|
|
|
@if (response is null)
|
|
|
|
{
|
|
|
|
<MudItem xs="12">
|
|
|
|
<MudText Align="Align.Center">
|
|
|
|
No data.
|
|
|
|
</MudText>
|
|
|
|
</MudItem>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<MudItem xs="12">
|
2022-09-11 00:21:14 +02:00
|
|
|
<MudTabs Elevation="0" Border="true" Rounded="true" ApplyEffectsToContainer="true" Outlined="true" Class="mb-10">
|
2022-09-10 21:43:01 +02:00
|
|
|
@foreach (var difficulty in Enum.GetValues<Difficulty>())
|
2022-09-10 17:45:18 +02:00
|
|
|
{
|
2022-09-10 21:43:01 +02:00
|
|
|
@if (difficulty is not Difficulty.None)
|
|
|
|
{
|
2022-09-11 18:28:12 +02:00
|
|
|
<MudTabPanel Text="@GetDifficultyTitle(difficulty)"
|
2022-09-11 00:21:14 +02:00
|
|
|
Icon="@GetDifficultyIcon(difficulty)">
|
2022-09-11 18:28:12 +02:00
|
|
|
@if (songBestDataMap.ContainsKey(difficulty))
|
2022-09-11 02:12:56 +02:00
|
|
|
{
|
2022-09-11 18:28:12 +02:00
|
|
|
<MudDataGrid Items="@songBestDataMap[difficulty]"
|
2022-09-13 17:00:00 +02:00
|
|
|
ColumnResizeMode="ResizeMode.None" RowsPerPage="25" Elevation="0">
|
2022-09-11 18:28:12 +02:00
|
|
|
<Columns>
|
2022-09-13 17:00:00 +02:00
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.SongId)" Title="Song" StickyLeft="true">
|
2022-09-11 18:28:12 +02:00
|
|
|
<CellTemplate>
|
2022-09-13 17:00:00 +02:00
|
|
|
<MudStack Row="true" Justify="Justify.SpaceBetween" AlignItems="AlignItems.Center">
|
|
|
|
<div style="width:300px">
|
2022-09-13 16:24:02 +02:00
|
|
|
<MudText Typo="Typo.body2" Style="font-weight:bold">@context.Item.MusicName</MudText>
|
|
|
|
<MudText Typo="Typo.caption">@context.Item.MusicArtist</MudText>
|
|
|
|
</div>
|
2022-09-13 16:49:48 +02:00
|
|
|
<div>
|
|
|
|
<MudToggleIconButton Toggled="@context.Item.IsFavorite"
|
|
|
|
ToggledChanged="@(async () => await OnFavoriteToggled(context.Item))"
|
|
|
|
Icon="@Icons.Material.Filled.FavoriteBorder" Color="@Color.Secondary"
|
|
|
|
ToggledIcon="@Icons.Material.Filled.Favorite" ToggledColor="@Color.Secondary"
|
|
|
|
Size="Size.Small"
|
|
|
|
ToggledSize="Size.Small"
|
|
|
|
Title="Add to favorites" ToggledTitle="Remove from favorites"/>
|
|
|
|
</div>
|
2022-09-13 16:24:02 +02:00
|
|
|
</MudStack>
|
2022-09-11 18:28:12 +02:00
|
|
|
</CellTemplate>
|
|
|
|
</Column>
|
2022-09-12 16:39:23 +02:00
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.SongId)" Title="Level" Sortable="false">
|
|
|
|
<CellTemplate>
|
2022-09-13 02:25:27 +02:00
|
|
|
<MudStack Row="true" Spacing="1" AlignItems="AlignItems.Center">
|
2022-09-12 16:39:23 +02:00
|
|
|
<MudIcon Icon="@Icons.Filled.Star" Size="Size.Small" />
|
|
|
|
<MudText Typo="Typo.caption" Style="line-height:1;margin-top:2px;margin-right:2px;">@GameDataService.GetMusicStarLevel(@context.Item.SongId, difficulty)</MudText>
|
|
|
|
</MudStack>
|
|
|
|
</CellTemplate>
|
|
|
|
</Column>
|
2022-09-12 11:29:29 +02:00
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.Genre)" Title="Genre"
|
2022-09-11 18:28:12 +02:00
|
|
|
Sortable="false" Filterable="true">
|
|
|
|
<CellTemplate>
|
2022-09-12 11:29:29 +02:00
|
|
|
<MudChip Style="@GetGenreStyle(context.Item.Genre)"
|
2022-09-11 18:28:12 +02:00
|
|
|
Size="Size.Small">
|
2022-09-12 11:29:29 +02:00
|
|
|
@GetGenreTitle(context.Item.Genre)
|
2022-09-11 18:28:12 +02:00
|
|
|
</MudChip>
|
|
|
|
</CellTemplate>
|
|
|
|
</Column>
|
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.BestScore)" Title="Best Score"/>
|
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.BestCrown)" Title="Best Crown">
|
|
|
|
<CellTemplate>
|
2022-09-13 16:49:48 +02:00
|
|
|
<img src="@($"/images/crown_{context.Item.BestCrown}.png")" alt="@(GetCrownText(context.Item.BestCrown))" title="@(GetCrownText(context.Item.BestCrown))" style="@IconStyle" />
|
2022-09-11 18:28:12 +02:00
|
|
|
</CellTemplate>
|
|
|
|
</Column>
|
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.BestScoreRank)" Title="Best Rank" Sortable="false">
|
|
|
|
<CellTemplate>
|
|
|
|
@if (context.Item.BestScoreRank is not ScoreRank.None)
|
|
|
|
{
|
2022-09-13 16:49:48 +02:00
|
|
|
<img src="@($"/images/rank_{context.Item.BestScoreRank}.png")" alt="@(GetRankText(context.Item.BestScoreRank))" title="@(GetRankText(context.Item.BestScoreRank))" style="@IconStyle" />
|
2022-09-11 18:28:12 +02:00
|
|
|
}
|
|
|
|
</CellTemplate>
|
|
|
|
</Column>
|
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.GoodCount)" Title="Good" Sortable="false"/>
|
2022-09-12 01:14:16 +02:00
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.OkCount)" Title="OK" Sortable="false"/>
|
2022-09-11 18:28:12 +02:00
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.MissCount)" Title="Bad" Sortable="false"/>
|
2022-09-12 01:14:16 +02:00
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.DrumrollCount)" Title="Drumroll" Sortable="false"/>
|
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.ComboCount)" Title="MAX Combo" Sortable="false"/>
|
2022-09-11 18:28:12 +02:00
|
|
|
<Column T="SongBestData" Field="@nameof(SongBestData.LastPlayTime)" Title="Last Played"/>
|
|
|
|
</Columns>
|
|
|
|
<PagerContent>
|
|
|
|
<MudDataGridPager T="SongBestData"/>
|
|
|
|
</PagerContent>
|
|
|
|
</MudDataGrid>
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-09-11 02:12:56 +02:00
|
|
|
<MudGrid>
|
|
|
|
<MudItem xs="12">
|
2022-09-11 23:32:24 +02:00
|
|
|
<MudText Align="Align.Center" Class="my-16">
|
2022-09-11 02:12:56 +02:00
|
|
|
No data for selected difficulty.
|
|
|
|
</MudText>
|
|
|
|
</MudItem>
|
|
|
|
</MudGrid>
|
|
|
|
}
|
2022-09-10 22:10:01 +02:00
|
|
|
</MudTabPanel>
|
2022-09-10 21:43:01 +02:00
|
|
|
}
|
2022-09-10 17:45:18 +02:00
|
|
|
}
|
|
|
|
</MudTabs>
|
|
|
|
</MudItem>
|
|
|
|
}
|
2022-09-11 18:28:12 +02:00
|
|
|
</MudGrid>
|