@@ -43,10 +43,11 @@ async function checkSession() {
|
|||||||
document.getElementById('userDisplay').textContent = data.username;
|
document.getElementById('userDisplay').textContent = data.username;
|
||||||
if (data.role === 'admin') document.getElementById('settingsBtn').classList.remove('d-none');
|
if (data.role === 'admin') document.getElementById('settingsBtn').classList.remove('d-none');
|
||||||
document.getElementById('loginOverlay').style.display = 'none';
|
document.getElementById('loginOverlay').style.display = 'none';
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (_) {}
|
} catch (_) {}
|
||||||
document.getElementById('loginOverlay').style.display = 'flex';
|
document.getElementById('loginOverlay').style.display = 'flex';
|
||||||
|
throw new Error('not logged in');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function performLogin(authToken) {
|
async function performLogin(authToken) {
|
||||||
@@ -177,7 +178,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
document.documentElement.setAttribute('data-bs-theme', 'dark');
|
||||||
});
|
}).catch(() => {});
|
||||||
});
|
});
|
||||||
|
|
||||||
function resizeCanvas() {
|
function resizeCanvas() {
|
||||||
|
|||||||
Reference in New Issue
Block a user