fixed centering issue with radius.

Signed-off-by: boris <boris@borishub.co.uk>
This commit is contained in:
boris
2025-04-22 01:17:48 +01:00
parent 183cca3fd3
commit d027e01ccc
12 changed files with 85 additions and 215 deletions

View File

@@ -15,7 +15,7 @@
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
<!-- Application JavaScript -->
<!-- Note: simpleAuth.js is already included in the header -->
<!-- Note: auth.js is already included in the header -->
<!-- Note: facilityData.js is already included in the header -->
<script src="/public/js/comments.js"></script>
@@ -55,12 +55,12 @@
// initialise CommentsManager
CommentsManager.state.isDomReady = true;
if (window.simpleAuth) {
if (window.auth) {
CommentsManager.state.isAuthReady = true;
CommentsManager.checkinitialise();
} else {
window.addEventListener('simpleAuthReady', () => {
console.log('SimpleAuth is now ready');
window.addEventListener('authReady', () => {
console.log('auth is now ready');
CommentsManager.state.isAuthReady = true;
CommentsManager.checkinitialise();
});
@@ -73,7 +73,7 @@
if (loginForm) {
// Show CAPTCHA if needed
if (simpleAuth.needsCaptcha() && captchaContainer) {
if (auth.needsCaptcha() && captchaContainer) {
captchaContainer.style.display = 'flex';
}
@@ -106,7 +106,7 @@
try {
// Attempt login
const result = await simpleAuth.login({
const result = await auth.login({
username: username,
password: password,
captchaInput: captchaInput
@@ -147,7 +147,7 @@
}
// Show CAPTCHA if needed
if (simpleAuth.needsCaptcha() && captchaContainer) {
if (auth.needsCaptcha() && captchaContainer) {
captchaContainer.style.display = 'flex';
// Generate new CAPTCHA if needed
if (result.captcha) {
@@ -178,13 +178,13 @@
if (logoutButton) {
logoutButton.addEventListener('click', async (e) => {
e.preventDefault();
await simpleAuth.logout();
await auth.logout();
});
}
// Validate token if authenticated
if (simpleAuth.isAuthenticated()) {
simpleAuth.validateToken().then(valid => {
if (auth.isAuthenticated()) {
auth.validateToken().then(valid => {
if (!valid) {
if (!localStorage.getItem('validationAttempted')) {
localStorage.setItem('validationAttempted', 'true');