@inject HttpClient Client @inject IDialogService DialogService @inject LoginService LoginService @inject NavigationManager NavigationManager @page "/Users"

@Localizer["users"]

@if (response is null) { @for (uint i = 0; i < 3; i++) { } } else if (response.Users.Count != 0) { if (LoginService.IsAdmin || !LoginService.LoginRequired) // Admin mode, can see all users { @foreach (var user in response.Users) { @Localizer["user"]: @user.Baid @Localizer["Show QR Code"] @Localizer["Manage Access Codes"] @Localizer["Change Password"] @Localizer["Reset Password"] @if (LoginService.AllowUserDelete) { @Localizer["Delete User"] } Access Code @user.AccessCodes[0] @if (user.AccessCodes.Count > 1) { ... and @(user.AccessCodes.Count - 1) other access code(s) } @Localizer["edit profile"] @Localizer["high scores"] @Localizer["dani dojo"] } } else { @if (!LoginService.IsLoggedIn) // Not logged in, show login form { Login Login @if (!LoginService.OnlyAdmin) { Register } } else { var user = LoginService.GetLoggedInUser(); // Logged in, show only own user User: @user.Baid Show QR Code Manage Access Codes Change Password @if (LoginService.AllowUserDelete) { Delete User } Access Code @user.AccessCodes[0] @if (user.AccessCodes.Count > 1) { ... and @(user.AccessCodes.Count - 1) other access code(s) } Edit Profile High Scores Dani Dojo } } } else { // No users in the database @Localizer["No data."] }