Delay consent checkbox hiding until successful auth
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user