fixed centering issue with radius.
Signed-off-by: boris <boris@borishub.co.uk>
This commit is contained in:
@@ -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');
|
||||
|
Reference in New Issue
Block a user