1
0
mirror of synced 2024-12-01 01:07:18 +01:00
GC-local-server-rewrite/MudAdmin/Pages/Users.razor
2022-04-25 02:07:11 +08:00

44 lines
1.2 KiB
Plaintext

@page "/users"
@using models = SharedProject.models
@using GenFu
@using MudAdmin.Utils
@inject NavigationManager NavigationManager
<PageTitle>Users</PageTitle>
<MudGrid>
@foreach (var user in users)
{
<MudItem>
<MudCard>
<MudCardHeader>
<CardHeaderContent>
<MudText Typo="Typo.h6">@user.PlayerName</MudText>
</CardHeaderContent>
</MudCardHeader>
<MudCardContent>
<MudText Typo="Typo.h6">Card ID</MudText>
<MudText>@user.CardId</MudText>
</MudCardContent>
<MudCardActions>
<MudButton Variant="Variant.Text" Color="Color.Primary" OnClick="() => OnClick(user)">Test</MudButton>
</MudCardActions>
</MudCard>
</MudItem>
}
</MudGrid>
@code {
private List<models.User> users = new();
protected override void OnInitialized()
{
base.OnInitialized();
users = MockDataRepo.GetMockDataRepo().Users;
}
private void OnClick(models.User user)
{
NavigationManager.NavigateTo($"user/{user.CardId}");
}
}