diff --git a/TaikoWebUI/Pages/Users.razor b/TaikoWebUI/Pages/Users.razor index 3f50d69..d21fa1a 100644 --- a/TaikoWebUI/Pages/Users.razor +++ b/TaikoWebUI/Pages/Users.razor @@ -7,12 +7,12 @@ @page "/Users" @Localizer["Users"] - - @if (!AuthService.LoginRequired || (AuthService.LoginRequired && AuthService.IsAdmin)) { - if (isLoading == true) - { - // Loading... - for (uint i = 0; i < 6; i++) { +@if (!AuthService.LoginRequired || (AuthService.LoginRequired && AuthService.IsAdmin)) { + if (isLoading == true || response == null) + { + // Loading... + for (uint i = 0; i < 6; i++) { + @@ -28,25 +28,38 @@ - } - } else if (response.Users.Count > 0) { - foreach (var user in response.Users) + + } + } else if (response.Users.Count > 0) { + + @foreach (var user in response.Users) { - - + + + + } + + @if (TotalPages > 1) + { + +
+ +
} - } else { // No users in the database +
+ } else { // No users in the database + @Localizer["No data."] - } - } else if (AuthService.LoginRequired && !AuthService.IsLoggedIn) { - // Not logged in, redirect - NavigationManager.NavigateTo("/Login"); - } else { - NavigationManager.NavigateTo("/"); + } -
\ No newline at end of file +} else if (AuthService.LoginRequired && !AuthService.IsLoggedIn) { + // Not logged in, redirect + NavigationManager.NavigateTo("/Login"); +} else { + NavigationManager.NavigateTo("/"); +} \ No newline at end of file