Fix exceptions
This commit is contained in:
parent
ec4338bdb9
commit
0bcf60da31
@ -43,7 +43,7 @@ public class SongBestData
|
||||
|
||||
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)">
|
||||
@if (songBestDataMap.ContainsKey(difficulty))
|
||||
{
|
||||
<MudDataGrid Items="@songBestDataMap[difficulty]"
|
||||
<MudDataGrid Items="@songBestDataMap[difficulty]" RowClick="(DataGridRowClickEventArgs<SongBestData> _) => { return;}"
|
||||
ColumnResizeMode="ResizeMode.None" RowsPerPage="25" Elevation="0">
|
||||
<Columns>
|
||||
<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.ShowAiData)" Title="AI Battle Data">
|
||||
<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>
|
||||
</Column>
|
||||
<Column T="SongBestData" Field="@nameof(SongBestData.LastPlayTime)" Title="Last Played" Hideable="true" />
|
||||
@ -101,7 +105,7 @@
|
||||
<ChildRowContent>
|
||||
@if (context.Item.ShowAiData)
|
||||
{
|
||||
<MudTr>
|
||||
<tr>
|
||||
<td colspan="1" class="pa-3 ai-battle-td">
|
||||
<MudText Typo="Typo.body2" Style="font-weight: bold">
|
||||
AI Battle Data
|
||||
@ -142,7 +146,7 @@
|
||||
</RowTemplate>
|
||||
</MudTable>
|
||||
</td>
|
||||
</MudTr>
|
||||
</tr>
|
||||
}
|
||||
</ChildRowContent>
|
||||
<PagerContent>
|
||||
|
Loading…
Reference in New Issue
Block a user