Delay consent checkbox hiding until successful auth

This commit is contained in:
2026-02-06 23:46:13 +01:00
parent 7319188fdb
commit b3192d5101

View File

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