1
0
mirror of synced 2024-11-15 02:47:35 +01:00
TaikoLocalServer/TaikoWebUI/Pages/DaniDojo.razor
2022-09-11 18:16:02 -04:00

120 lines
6.7 KiB
Plaintext

@inject IGameDataService GameDataService
@inject HttpClient Client
@page "/Cards/{baid:int}/DaniDojo"
<MudBreadcrumbs Items="breadcrumbs" Class="px-0"></MudBreadcrumbs>
<h1>Dani Dojo</h1>
<MudText Typo="Typo.caption">Card: @Baid</MudText>
<MudGrid Class="my-4">
<MudItem xs="12">
<MudPaper Elevation="0" Outlined="true">
<MudTabs>
@for (uint i = 1; i <= 19; i++)
{
var danId = i;
var danData = GameDataService.GetDanDataById(danId);
<MudTabPanel Text="@GetDanTitle(danData.Title)">
<MudGrid Class="pa-8">
@if (!bestDataMap.ContainsKey(danId))
{
<MudItem xs="12">
<MudAlert Severity="Severity.Info">This dan course hasn't been played yet.</MudAlert>
</MudItem>
}
@for (uint i = 0; i <= 2; i++)
{
var danDataOdaiSong = danData.OdaiSongList[(int)i];
var sectionNumber = (int)i + 1;
<MudItem xs="12" Class="pb-1">
<MudCard Outlined="true" Class="pa-4">
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="16">
<MudStack Class="pl-3">
<h3>@sectionNumber</h3>
</MudStack>
<MudStack AlignItems="AlignItems.Center" Spacing="1">
<img src=@($"/images/difficulty_{(Difficulty)danDataOdaiSong.Level}.png") style="width:40px;height:40px;" />
<MudText Typo="Typo.caption">@((Difficulty)danDataOdaiSong.Level)</MudText>
</MudStack>
<MudStack Spacing="0">
<MudText Typo="Typo.body1" Style="font-weight: bold;">@GameDataService.GetMusicNameBySongId(danDataOdaiSong.SongNo)</MudText>
<MudText Typo="Typo.caption">@GameDataService.GetMusicArtistBySongId(danDataOdaiSong.SongNo)</MudText>
</MudStack>
</MudStack>
</MudCard>
</MudItem>
}
<MudItem xs="12">
<MudGrid>
<MudItem xs="12" md="4">
<MudCard Outlined="true" Class="pa-4">
<h4>Soul Gauge</h4>
</MudCard>
</MudItem>
<MudItem xs="12" md="8">
<MudStack>
<MudCard Outlined="true" Class="pa-4">
<h4>Requirement Placeholder</h4>
</MudCard>
<MudCard Outlined="true" Class="pa-4">
<h4>Requirement Placeholder</h4>
</MudCard>
<MudCard Outlined="true" Class="pa-4">
<h4>Requirement Placeholder</h4>
</MudCard>
</MudStack>
</MudItem>
</MudGrid>
@foreach (var data in danData.OdaiBorderList)
{
<MudText>@DanRequirementToString(data)</MudText>
}
@if (bestDataMap.ContainsKey(danId))
{
var danBestData = bestDataMap[danId];
<MudText>Clear state: @danBestData.ClearState </MudText>
<MudText>Best Soul gauge: @danBestData.SoulGaugeTotal </MudText>
<MudText>Best Total Combo: @danBestData.ComboCountTotal </MudText>
<MudGrid>
@foreach (var bestStage in danBestData.DanBestStageDataList)
{
var songNumber = bestStage.SongNumber;
var danDataOdaiSong = danData.OdaiSongList[(int)songNumber];
<MudItem>
<MudText>Song Number: @songNumber</MudText>
<MudText>
Song Name:
@GameDataService.GetMusicNameBySongId(danDataOdaiSong.SongNo)
</MudText>
<MudText>Song Difficulty: @((Difficulty)danDataOdaiSong.Level)</MudText>
<MudText>
Song play detail <br />
Good : @bestStage.GoodCount <br />
Ok : @bestStage.OkCount <br />
Bad : @bestStage.BadCount <br />
Combo : @bestStage.ComboCount<br />
Drumroll : @bestStage.DrumrollCount <br />
Total hit : @bestStage.TotalHitCount
</MudText>
</MudItem>
}
</MudGrid>
}
</MudItem>
</MudGrid>
</MudTabPanel>
}
</MudTabs>
</MudPaper>
</MudItem>
</MudGrid>