Fix exceptions
This commit is contained in:
parent
ec4338bdb9
commit
0bcf60da31
@ -43,7 +43,7 @@ public class SongBestData
|
|||||||
|
|
||||||
public uint DrumrollCount { get; set; }
|
public uint DrumrollCount { get; set; }
|
||||||
|
|
||||||
public List<AiSectionBestData> AiSectionBestData { get; set; }
|
public List<AiSectionBestData> AiSectionBestData { get; set; } = new();
|
||||||
|
|
||||||
public bool ShowAiData { get; set; } = false;
|
public bool ShowAiData { get; set; }
|
||||||
}
|
}
|
@ -29,7 +29,7 @@
|
|||||||
Icon="@GetDifficultyIcon(difficulty)">
|
Icon="@GetDifficultyIcon(difficulty)">
|
||||||
@if (songBestDataMap.ContainsKey(difficulty))
|
@if (songBestDataMap.ContainsKey(difficulty))
|
||||||
{
|
{
|
||||||
<MudDataGrid Items="@songBestDataMap[difficulty]"
|
<MudDataGrid Items="@songBestDataMap[difficulty]" RowClick="(DataGridRowClickEventArgs<SongBestData> _) => { return;}"
|
||||||
ColumnResizeMode="ResizeMode.None" RowsPerPage="25" Elevation="0">
|
ColumnResizeMode="ResizeMode.None" RowsPerPage="25" Elevation="0">
|
||||||
<Columns>
|
<Columns>
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.SongId)" Title="Song" StickyLeft="true">
|
<Column T="SongBestData" Field="@nameof(SongBestData.SongId)" Title="Song" StickyLeft="true">
|
||||||
@ -89,7 +89,11 @@
|
|||||||
<Column T="SongBestData" Field="@nameof(SongBestData.ComboCount)" Title="MAX Combo" Sortable="false" />
|
<Column T="SongBestData" Field="@nameof(SongBestData.ComboCount)" Title="MAX Combo" Sortable="false" />
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.ShowAiData)" Title="AI Battle Data">
|
<Column T="SongBestData" Field="@nameof(SongBestData.ShowAiData)" Title="AI Battle Data">
|
||||||
<CellTemplate>
|
<CellTemplate>
|
||||||
<MudButton Variant="Variant.Outlined" Size="Size.Small" OnClick="@(()=> ToggleShowAiData(context.Item))" Disabled="@(!IsAiDataPresent(context.Item))">@(context.Item.ShowAiData ? "Hide" : "Show")</MudButton>
|
<MudButton Variant="Variant.Outlined" Size="Size.Small"
|
||||||
|
OnClick="@(() => ToggleShowAiData(context.Item))"
|
||||||
|
Disabled="@(!IsAiDataPresent(context.Item))">
|
||||||
|
@(context.Item.ShowAiData ? "Hide" : "Show")
|
||||||
|
</MudButton>
|
||||||
</CellTemplate>
|
</CellTemplate>
|
||||||
</Column>
|
</Column>
|
||||||
<Column T="SongBestData" Field="@nameof(SongBestData.LastPlayTime)" Title="Last Played" Hideable="true" />
|
<Column T="SongBestData" Field="@nameof(SongBestData.LastPlayTime)" Title="Last Played" Hideable="true" />
|
||||||
@ -101,7 +105,7 @@
|
|||||||
<ChildRowContent>
|
<ChildRowContent>
|
||||||
@if (context.Item.ShowAiData)
|
@if (context.Item.ShowAiData)
|
||||||
{
|
{
|
||||||
<MudTr>
|
<tr>
|
||||||
<td colspan="1" class="pa-3 ai-battle-td">
|
<td colspan="1" class="pa-3 ai-battle-td">
|
||||||
<MudText Typo="Typo.body2" Style="font-weight: bold">
|
<MudText Typo="Typo.body2" Style="font-weight: bold">
|
||||||
AI Battle Data
|
AI Battle Data
|
||||||
@ -142,7 +146,7 @@
|
|||||||
</RowTemplate>
|
</RowTemplate>
|
||||||
</MudTable>
|
</MudTable>
|
||||||
</td>
|
</td>
|
||||||
</MudTr>
|
</tr>
|
||||||
}
|
}
|
||||||
</ChildRowContent>
|
</ChildRowContent>
|
||||||
<PagerContent>
|
<PagerContent>
|
||||||
|
Loading…
Reference in New Issue
Block a user