Commit ·
28a4120
1
Parent(s): e665557
fix: Login system - CSS specificity fix and debug logging
Browse files- static/css/styles.css +4 -0
- static/js/main.js +7 -1
static/css/styles.css
CHANGED
|
@@ -375,6 +375,10 @@ textarea {
|
|
| 375 |
z-index: 10000;
|
| 376 |
}
|
| 377 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 378 |
.login-box {
|
| 379 |
background: var(--bg-card);
|
| 380 |
border-radius: 20px;
|
|
|
|
| 375 |
z-index: 10000;
|
| 376 |
}
|
| 377 |
|
| 378 |
+
.login-overlay.hidden {
|
| 379 |
+
display: none !important;
|
| 380 |
+
}
|
| 381 |
+
|
| 382 |
.login-box {
|
| 383 |
background: var(--bg-card);
|
| 384 |
border-radius: 20px;
|
static/js/main.js
CHANGED
|
@@ -28,15 +28,21 @@ function showLogin() {
|
|
| 28 |
|
| 29 |
function handleLogin(e) {
|
| 30 |
e.preventDefault();
|
| 31 |
-
const username = document.getElementById('loginUsername').value;
|
| 32 |
const password = document.getElementById('loginPassword').value;
|
| 33 |
const errorEl = document.getElementById('loginError');
|
| 34 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 35 |
if (username === AUTH_CONFIG.username && password === AUTH_CONFIG.password) {
|
|
|
|
| 36 |
localStorage.setItem(AUTH_CONFIG.storageKey, "true");
|
| 37 |
errorEl.classList.add('hidden');
|
| 38 |
showApp();
|
| 39 |
} else {
|
|
|
|
| 40 |
errorEl.textContent = "❌ Incorrect username or password";
|
| 41 |
errorEl.classList.remove('hidden');
|
| 42 |
}
|
|
|
|
| 28 |
|
| 29 |
function handleLogin(e) {
|
| 30 |
e.preventDefault();
|
| 31 |
+
const username = document.getElementById('loginUsername').value.trim();
|
| 32 |
const password = document.getElementById('loginPassword').value;
|
| 33 |
const errorEl = document.getElementById('loginError');
|
| 34 |
|
| 35 |
+
// Debug logging
|
| 36 |
+
console.log('Login attempt:', { username, passwordLength: password.length });
|
| 37 |
+
console.log('Expected:', { username: AUTH_CONFIG.username, password: AUTH_CONFIG.password });
|
| 38 |
+
|
| 39 |
if (username === AUTH_CONFIG.username && password === AUTH_CONFIG.password) {
|
| 40 |
+
console.log('Login SUCCESS!');
|
| 41 |
localStorage.setItem(AUTH_CONFIG.storageKey, "true");
|
| 42 |
errorEl.classList.add('hidden');
|
| 43 |
showApp();
|
| 44 |
} else {
|
| 45 |
+
console.log('Login FAILED - credentials mismatch');
|
| 46 |
errorEl.textContent = "❌ Incorrect username or password";
|
| 47 |
errorEl.classList.remove('hidden');
|
| 48 |
}
|