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);