From 28a09df28cb3331572435fb08759b3574b8d1a08 Mon Sep 17 00:00:00 2001 From: shiibe <82057235+shiibe@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:46:59 -0400 Subject: [PATCH 1/3] Add xl screen layout to users page --- TaikoWebUI/Pages/Users.razor | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TaikoWebUI/Pages/Users.razor b/TaikoWebUI/Pages/Users.razor index 18ba81a..43885ea 100644 --- a/TaikoWebUI/Pages/Users.razor +++ b/TaikoWebUI/Pages/Users.razor @@ -9,11 +9,11 @@ @Localizer["Users"] @if (!AuthService.LoginRequired || (AuthService.LoginRequired && AuthService.IsAdmin)) { - if (isLoading == true) + if (isLoading == true || response == null) { // Loading... for (uint i = 0; i < 6; i++) { - + @@ -32,7 +32,7 @@ } else if (response.Users.Count > 0) { foreach (var user in response.Users) { - + } From 96b175138a86b86650823958663c527b6d5d946d Mon Sep 17 00:00:00 2001 From: shiibe <82057235+shiibe@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:47:54 -0400 Subject: [PATCH 2/3] Bump loading cards up to page limit --- TaikoWebUI/Pages/Users.razor | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TaikoWebUI/Pages/Users.razor b/TaikoWebUI/Pages/Users.razor index 43885ea..0b25fb5 100644 --- a/TaikoWebUI/Pages/Users.razor +++ b/TaikoWebUI/Pages/Users.razor @@ -12,7 +12,7 @@ if (isLoading == true || response == null) { // Loading... - for (uint i = 0; i < 6; i++) { + for (uint i = 0; i < 12; i++) { From a9b91fb1b681857593f873fbc82e22a30ac57a40 Mon Sep 17 00:00:00 2001 From: shiibe <82057235+shiibe@users.noreply.github.com> Date: Wed, 5 Jun 2024 11:58:07 -0400 Subject: [PATCH 3/3] Fix access code page --- TaikoWebUI/Pages/AccessCode.razor.cs | 10 +--------- TaikoWebUI/Pages/Users.razor | 2 +- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/TaikoWebUI/Pages/AccessCode.razor.cs b/TaikoWebUI/Pages/AccessCode.razor.cs index 80f9c1c..2ddb680 100644 --- a/TaikoWebUI/Pages/AccessCode.razor.cs +++ b/TaikoWebUI/Pages/AccessCode.razor.cs @@ -43,15 +43,7 @@ public partial class AccessCode private async Task InitializeUser() { - if (!AuthService.LoginRequired) - { - var users = await Client.GetFromJsonAsync>("api/Users"); - if (users != null) User = users.FirstOrDefault(u => u.Baid == Baid); - } - else if (AuthService.IsLoggedIn) - { - User = await Client.GetFromJsonAsync($"api/Users/{Baid}"); - } + User = await Client.GetFromJsonAsync($"api/Users/{Baid}"); } private async Task DeleteAccessCode(string accessCode) diff --git a/TaikoWebUI/Pages/Users.razor b/TaikoWebUI/Pages/Users.razor index 0b25fb5..56d2371 100644 --- a/TaikoWebUI/Pages/Users.razor +++ b/TaikoWebUI/Pages/Users.razor @@ -12,7 +12,7 @@ if (isLoading == true || response == null) { // Loading... - for (uint i = 0; i < 12; i++) { + for (uint i = 0; i < pageSize; i++) {