1
0
mirror of synced 2024-12-05 02:57:59 +01:00
GC-local-server-rewrite/WebUI/Pages/Cards.razor

73 lines
2.6 KiB
Plaintext
Raw Normal View History

2023-02-16 17:38:01 +01:00
@page "/Cards"
2023-02-17 18:29:20 +01:00
<PageTitle>Cards</PageTitle>
<MudContainer>
@if (ErrorMessage != string.Empty)
{
<MudText Color="Color.Error" Typo="Typo.h3">@ErrorMessage</MudText>
return;
}
@if (CardDtos is null)
{
<MudGrid>
@for (var i = 0; i < 5; i++)
{
<MudItem>
<MudCard>
<MudCardHeader>
<CardHeaderContent>
<MudSkeleton SkeletonType="SkeletonType.Rectangle" Height="32px"/>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudSkeleton Width="80px" Height="32px"/>
<MudSkeleton Width="147px" Height="28px"/>
</MudCardContent>
<MudCardActions>
<MudSkeleton SkeletonType="SkeletonType.Rectangle" Width="99px" Height="25px" Class="ml-2"/>
</MudCardActions>
</MudCard>
</MudItem>
}
</MudGrid>
return;
}
@if (CardDtos.Count != 0)
{
<MudGrid>
@foreach (var card in CardDtos)
{
<MudItem>
<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>@card.CardId</MudText>
</MudCardContent>
<MudCardActions>
<MudButton Variant="Variant.Text" Color="Color.Primary">
Check detail
</MudButton>
</MudCardActions>
</MudCard>
</MudItem>
}
</MudGrid>
return;
}
<MudText Align="Align.Center" Typo="Typo.h3">
No Data
</MudText>
</MudContainer>