2022-09-11 18:33:58 +02:00
|
|
|
@inject HttpClient Client
|
2022-09-10 06:56:53 +02:00
|
|
|
@inject IDialogService DialogService
|
|
|
|
|
|
|
|
@page "/Cards"
|
|
|
|
|
|
|
|
<h1>Cards</h1>
|
|
|
|
|
|
|
|
<MudGrid Class="my-8">
|
|
|
|
@if (response is null)
|
|
|
|
{
|
|
|
|
@for (uint i = 0; i < 3; i++)
|
|
|
|
{
|
|
|
|
<MudItem xs="12" md="6" lg="4">
|
|
|
|
<MudCard Outlined="true">
|
|
|
|
<MudCardContent>
|
|
|
|
<MudSkeleton Width="30%" Height="42px;" Class="mb-5"/>
|
|
|
|
<MudSkeleton Width="80%"/>
|
|
|
|
<MudSkeleton Width="100%"/>
|
|
|
|
</MudCardContent>
|
|
|
|
<MudCardActions>
|
|
|
|
<MudStack Row="true" Style="width:100%" Spacing="4" Justify="Justify.FlexEnd">
|
|
|
|
<MudSkeleton Width="64px" Height="40px"/>
|
|
|
|
<MudSkeleton Width="64px" Height="40px"/>
|
|
|
|
</MudStack>
|
|
|
|
</MudCardActions>
|
|
|
|
</MudCard>
|
|
|
|
</MudItem>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (response.Users.Count != 0)
|
|
|
|
{
|
|
|
|
@foreach (var user in response.Users)
|
|
|
|
{
|
|
|
|
<MudItem xs="12" md="6" lg="4">
|
|
|
|
<MudCard Outlined="true">
|
|
|
|
<MudCardHeader>
|
|
|
|
<CardHeaderContent>
|
|
|
|
<MudText Typo="Typo.h6" Style="font-weight:bold">@user.Baid</MudText>
|
|
|
|
</CardHeaderContent>
|
|
|
|
<CardHeaderActions>
|
2022-09-10 22:10:01 +02:00
|
|
|
<MudMenu Icon="@Icons.Material.Filled.MoreVert" Dense="true" AnchorOrigin="Origin.BottomLeft"
|
|
|
|
TransformOrigin="Origin.TopLeft" Size="Size.Small">
|
2022-09-10 06:56:53 +02:00
|
|
|
<MudMenuItem Icon="@Icons.Material.Filled.Delete"
|
2022-09-10 22:10:01 +02:00
|
|
|
OnClick="_ => DeleteCard(user)"
|
|
|
|
IconColor="@Color.Error">
|
|
|
|
Delete Card
|
2022-09-10 06:56:53 +02:00
|
|
|
</MudMenuItem>
|
|
|
|
</MudMenu>
|
|
|
|
</CardHeaderActions>
|
|
|
|
</MudCardHeader>
|
|
|
|
<MudCardContent>
|
|
|
|
<MudText Style="font-weight:bold">Access Code</MudText>
|
|
|
|
<MudText Style="font-family:monospace">@user.AccessCode</MudText>
|
|
|
|
</MudCardContent>
|
|
|
|
<MudCardActions>
|
|
|
|
<MudStack Row="true" Style="width:100%" Spacing="4" Justify="Justify.FlexEnd">
|
|
|
|
<MudButton Href="@($"Cards/{user.Baid}/Profile")"
|
|
|
|
Size="Size.Small" Variant="Variant.Text" StartIcon="@Icons.Material.Filled.Edit"
|
|
|
|
Color="Color.Primary">
|
|
|
|
Edit Profile
|
|
|
|
</MudButton>
|
2022-09-10 22:10:01 +02:00
|
|
|
<MudMenu Size="Size.Small"
|
|
|
|
Dense="true"
|
2022-09-10 21:58:06 +02:00
|
|
|
Color="Color.Primary"
|
|
|
|
Label="View Play Data"
|
|
|
|
StartIcon="@Icons.Filled.FeaturedPlayList"
|
|
|
|
EndIcon="@Icons.Filled.KeyboardArrowDown"
|
|
|
|
FullWidth="true"
|
|
|
|
AnchorOrigin="Origin.BottomCenter"
|
|
|
|
TransformOrigin="Origin.TopCenter">
|
2022-09-10 23:56:48 +02:00
|
|
|
<MudMenuItem Href="@($"Cards/{user.Baid}/TaikoMode")">Taiko Mode</MudMenuItem>
|
|
|
|
<MudMenuItem Href="@($"Cards/{user.Baid}/DaniDojo")">Dani Dojo</MudMenuItem>
|
|
|
|
@*<MudMenuItem Href="@($"Cards/{user.Baid}/AIBattle")">AI Battle</MudMenuItem>*@
|
2022-09-10 21:58:06 +02:00
|
|
|
</MudMenu>
|
2022-09-10 06:56:53 +02:00
|
|
|
</MudStack>
|
|
|
|
</MudCardActions>
|
|
|
|
</MudCard>
|
|
|
|
</MudItem>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
<MudItem xs="12">
|
|
|
|
<MudText Align="Align.Center" Class="my-8">
|
|
|
|
No data.
|
|
|
|
</MudText>
|
|
|
|
</MudItem>
|
|
|
|
}
|
2022-09-11 18:33:58 +02:00
|
|
|
</MudGrid>
|