From b3192d510159cc04fac0f7a3165da80ffdb641e3 Mon Sep 17 00:00:00 2001 From: Frank Tovar Date: Fri, 6 Feb 2026 23:46:13 +0100 Subject: [PATCH] Delay consent checkbox hiding until successful auth --- wwwroot/app.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wwwroot/app.js b/wwwroot/app.js index 3d78d9e..19d49e6 100644 --- a/wwwroot/app.js +++ b/wwwroot/app.js @@ -52,10 +52,6 @@ function setupHandlers() { const box = $(id); if (box) { box.checked = hasConsent(); - box.addEventListener("change", () => { - if (box.checked) setConsent(); - toggleConsentRows(); - }); } }); @@ -99,6 +95,7 @@ function setupHandlers() { try { await api.login({ username, password }); setConsent(); + toggleConsentRows(); setSavedUsername(username); state.isAuthenticated = true; setAuthUI(true); @@ -127,6 +124,7 @@ function setupHandlers() { try { await api.register({ username, password, displayName, adminKey }); setConsent(); + toggleConsentRows(); setSavedUsername(username); state.isAuthenticated = true; setAuthUI(true);