2023-02-16 17:38:01 +01:00
|
|
|
@page "/Cards"
|
2023-02-17 18:29:20 +01:00
|
|
|
|
|
|
|
<PageTitle>Cards</PageTitle>
|
2023-02-21 15:45:51 +01:00
|
|
|
<h1>Cards</h1>
|
|
|
|
|
|
|
|
@if (ErrorMessage != string.Empty)
|
|
|
|
{
|
|
|
|
<MudText Color="Color.Error" Typo="Typo.h3">@ErrorMessage</MudText>
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
<MudGrid Class="my-8">
|
2023-02-17 18:29:20 +01:00
|
|
|
|
|
|
|
@if (CardDtos is null)
|
|
|
|
{
|
2023-02-21 15:45:51 +01:00
|
|
|
@for (var i = 0; i < 3; i++)
|
|
|
|
{
|
|
|
|
<MudItem xs="12" md="6" lg="4">
|
|
|
|
<MudCard Outlined="true">
|
|
|
|
<MudCardHeader>
|
|
|
|
<CardHeaderContent>
|
|
|
|
<MudSkeleton Width="30%" Height="32px;" Class="mb-5"/>
|
|
|
|
</CardHeaderContent>
|
|
|
|
</MudCardHeader>
|
|
|
|
<MudCardContent>
|
|
|
|
<MudSkeleton Width="60%"/>
|
|
|
|
<MudSkeleton Width="100%"/>
|
|
|
|
</MudCardContent>
|
|
|
|
<MudCardActions>
|
|
|
|
<MudStack Row="true" Style="width:100%" Spacing="4" Justify="Justify.FlexEnd">
|
|
|
|
<MudSkeleton Width="128px" Height="32px"/>
|
|
|
|
<MudSkeleton Width="148px" Height="32px"/>
|
|
|
|
</MudStack>
|
|
|
|
</MudCardActions>
|
|
|
|
</MudCard>
|
|
|
|
</MudItem>
|
|
|
|
}
|
2023-02-17 18:29:20 +01:00
|
|
|
return;
|
|
|
|
}
|
2023-02-21 15:45:51 +01:00
|
|
|
|
2023-02-17 18:29:20 +01:00
|
|
|
@if (CardDtos.Count != 0)
|
|
|
|
{
|
2023-02-21 15:45:51 +01:00
|
|
|
@foreach (var card in CardDtos)
|
|
|
|
{
|
|
|
|
<MudItem xs="12" md="6" lg="4">
|
|
|
|
<MudCard>
|
|
|
|
<MudCardHeader>
|
|
|
|
<CardHeaderContent>
|
|
|
|
<MudText Typo="Typo.h5">@card.PlayerName</MudText>
|
|
|
|
</CardHeaderContent>
|
|
|
|
<CardHeaderActions>
|
|
|
|
<MudIconButton Icon="@Icons.Material.Filled.Edit" Color="Color.Default"
|
|
|
|
OnClick="() => OnEditPlayerNameClicked(card)"/>
|
|
|
|
</CardHeaderActions>
|
|
|
|
</MudCardHeader>
|
|
|
|
<MudCardContent>
|
|
|
|
<MudText Style="font-weight: bold">Card ID</MudText>
|
|
|
|
<MudText Style="font-family:monospace">@card.CardId</MudText>
|
|
|
|
</MudCardContent>
|
|
|
|
<MudCardActions>
|
|
|
|
<MudStack Row="true" Style="width:100%" Spacing="4" Justify="Justify.FlexEnd">
|
|
|
|
<MudButton Href="@($"Cards/Option/{card.CardId}")"
|
|
|
|
Variant="Variant.Text"
|
|
|
|
StartIcon="@Icons.Material.Filled.DisplaySettings"
|
|
|
|
Color="Color.Primary">
|
|
|
|
Edit Options
|
2023-02-17 18:29:20 +01:00
|
|
|
</MudButton>
|
2023-02-21 15:45:51 +01:00
|
|
|
<MudMenu Dense="true"
|
|
|
|
Color="Color.Primary"
|
|
|
|
Label="View Play Data"
|
|
|
|
StartIcon="@Icons.Material.Filled.FeaturedPlayList"
|
|
|
|
EndIcon="@Icons.Material.Filled.KeyboardArrowDown"
|
|
|
|
FullWidth="true"
|
|
|
|
AnchorOrigin="Origin.BottomCenter"
|
|
|
|
TransformOrigin="Origin.TopCenter">
|
|
|
|
<MudMenuItem Href="@($"Cards/TotalResult/{card.CardId}")">Total Result</MudMenuItem>
|
2023-02-22 17:35:59 +01:00
|
|
|
<MudMenuItem Href="@($"Cards/PlayRecords/{card.CardId}")">Song Play Results</MudMenuItem>
|
2023-02-21 15:45:51 +01:00
|
|
|
</MudMenu>
|
|
|
|
</MudStack>
|
|
|
|
</MudCardActions>
|
|
|
|
</MudCard>
|
|
|
|
</MudItem>
|
|
|
|
}
|
2023-02-17 18:29:20 +01:00
|
|
|
return;
|
|
|
|
}
|
2023-02-21 15:45:51 +01:00
|
|
|
|
|
|
|
<MudItem xs="12">
|
|
|
|
<MudText Align="Align.Center" Typo="Typo.h3">
|
|
|
|
No Data
|
|
|
|
</MudText>
|
|
|
|
</MudItem>
|
|
|
|
</MudGrid>
|