44 lines
1.2 KiB
Plaintext
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}");
|
|
}
|
|
} |