1
0
mirror of synced 2024-12-01 01:27:21 +01:00
TaikoLocalServer/TaikoWebUI/Pages/DaniDojo.razor

155 lines
9.9 KiB
Plaintext
Raw Normal View History

2022-09-11 18:28:12 +02:00
@inject IGameDataService GameDataService
2022-09-10 23:56:48 +02:00
@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>
2022-09-11 23:32:24 +02:00
<MudGrid Class="my-4">
<MudItem xs="12">
<MudPaper Elevation="0" Outlined="true">
<MudTabs>
@for (uint i = 1; i <= 19; i++)
2022-09-11 18:28:12 +02:00
{
2022-09-11 23:32:24 +02:00
var danId = i;
var danData = GameDataService.GetDanDataById(danId);
<MudTabPanel Text="@GetDanTitle(danData.Title)">
2022-09-12 00:12:11 +02:00
<MudGrid Class="pa-8">
@if (!bestDataMap.ContainsKey(danId))
{
2022-09-11 23:32:24 +02:00
<MudItem xs="12">
<MudAlert Severity="Severity.Info">This dan course hasn't been played yet.</MudAlert>
</MudItem>
}
2022-09-12 00:12:11 +02:00
@for (uint i = 0; i <= 2; i++)
{
var index = i;
2022-09-12 00:12:11 +02:00
var danDataOdaiSong = danData.OdaiSongList[(int)i];
var sectionNumber = (int)i + 1;
<MudItem xs="12" Class="pb-1">
<MudCard Outlined="true" Class="pa-4">
<MudGrid Style="display:flex; align-items: center; justify-content: flex-start;">
<MudItem xs="1" md="1" Style="display:flex;flex-direction:column;align-items:center;">
2022-09-12 00:12:11 +02:00
<h3>@sectionNumber</h3>
</MudItem>
2022-09-12 00:12:11 +02:00
<MudItem xs="2" md="1" Style="display:flex;flex-direction:column;align-items:center;">
2022-09-12 00:12:11 +02:00
<img src=@($"/images/difficulty_{(Difficulty)danDataOdaiSong.Level}.png") style="width:40px;height:40px;" />
<MudText Typo="Typo.caption">@((Difficulty)danDataOdaiSong.Level)</MudText>
</MudItem>
2022-09-12 00:12:11 +02:00
<MudItem xs="9" md="4" Style="display:flex;flex-direction:column;" Class="pl-4">
2022-09-12 00:12:11 +02:00
<MudText Typo="Typo.body1" Style="font-weight: bold;">@GameDataService.GetMusicNameBySongId(danDataOdaiSong.SongNo)</MudText>
<MudText Typo="Typo.caption">@GameDataService.GetMusicArtistBySongId(danDataOdaiSong.SongNo)</MudText>
</MudItem>
<MudItem xs="12" md="6" Style="display:flex;flex-direction:column;">
@if (bestDataMap.ContainsKey(danId))
{
var danBestData = bestDataMap[danId];
var bestStage = danBestData.DanBestStageDataList[(int)index];
<MudStack Row="true" Spacing="4" Justify="Justify.SpaceEvenly">
<MudCard Elevation="0">
<MudText Typo="Typo.caption">Good</MudText>
<MudText Typo="Typo.body1" Style="font-weight: bold;">@bestStage.GoodCount</MudText>
</MudCard>
<MudCard Elevation="0">
<MudText Typo="Typo.caption">OK</MudText>
<MudText Typo="Typo.body1" Style="font-weight: bold;">@bestStage.OkCount</MudText>
</MudCard>
<MudCard Elevation="0">
<MudText Typo="Typo.caption">Bad</MudText>
<MudText Typo="Typo.body1" Style="font-weight: bold;">@bestStage.BadCount</MudText>
</MudCard>
<MudCard Elevation="0">
<MudText Typo="Typo.caption">Drumroll</MudText>
<MudText Typo="Typo.body1" Style="font-weight: bold;">@bestStage.DrumrollCount</MudText>
</MudCard>
<MudCard Elevation="0">
<MudText Typo="Typo.caption">MAX Combo</MudText>
<MudText Typo="Typo.body1" Style="font-weight: bold;">@bestStage.ComboCount</MudText>
</MudCard>
<MudCard Elevation="0">
<MudText Typo="Typo.caption">Total Hits</MudText>
<MudText Typo="Typo.body1" Style="font-weight: bold;">@bestStage.TotalHitCount</MudText>
</MudCard>
</MudStack>
}
</MudItem>
</MudGrid>
2022-09-12 00:12:11 +02:00
</MudCard>
</MudItem>
}
2022-09-11 23:32:24 +02:00
<MudItem xs="12">
2022-09-12 00:12:11 +02:00
<MudGrid>
<MudItem xs="12" md="3">
2022-09-12 00:12:11 +02:00
<MudCard Outlined="true" Class="pa-4">
<h4>Soul Gauge</h4>
</MudCard>
</MudItem>
<MudItem xs="12" md="9">
2022-09-12 00:12:11 +02:00
<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>
2022-09-11 23:32:24 +02:00
@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>
2022-09-11 18:28:12 +02:00
}
2022-09-11 23:32:24 +02:00
</MudTabs>
</MudPaper>
</MudItem>
</MudGrid>