Spaces:
Sleeping
Sleeping
Update static/js/auth.js
Browse files- static/js/auth.js +7 -0
static/js/auth.js
CHANGED
|
@@ -16,8 +16,12 @@ window.onload = () => {
|
|
| 16 |
// Bypass login screen if already authenticated
|
| 17 |
document.getElementById('auth-screen').style.display = 'none';
|
| 18 |
document.getElementById('app-layout').style.display = 'flex';
|
|
|
|
|
|
|
|
|
|
| 19 |
if (typeof initTerminal === "function") initTerminal(); // Boot Terminal WebSocket
|
| 20 |
if (typeof initEditor === "function") initEditor();
|
|
|
|
| 21 |
if (typeof loadSettings === "function") loadSettings();
|
| 22 |
}
|
| 23 |
};
|
|
@@ -72,9 +76,12 @@ async function handleAuth(action) {
|
|
| 72 |
// Hide auth, show app
|
| 73 |
document.getElementById('auth-screen').style.display = 'none';
|
| 74 |
document.getElementById('app-layout').style.display = 'flex';
|
|
|
|
|
|
|
| 75 |
|
| 76 |
if (typeof initTerminal === "function") initTerminal();
|
| 77 |
if (typeof initEditor === "function") initEditor();
|
|
|
|
| 78 |
if (typeof loadSettings === "function") loadSettings();
|
| 79 |
} else {
|
| 80 |
errDiv.style.color = "var(--error-color)";
|
|
|
|
| 16 |
// Bypass login screen if already authenticated
|
| 17 |
document.getElementById('auth-screen').style.display = 'none';
|
| 18 |
document.getElementById('app-layout').style.display = 'flex';
|
| 19 |
+
|
| 20 |
+
switchView('dashboard-view', document.querySelectorAll('.nav-item')[0]);
|
| 21 |
+
|
| 22 |
if (typeof initTerminal === "function") initTerminal(); // Boot Terminal WebSocket
|
| 23 |
if (typeof initEditor === "function") initEditor();
|
| 24 |
+
if (typeof initDashboard === "function") initDashboard();
|
| 25 |
if (typeof loadSettings === "function") loadSettings();
|
| 26 |
}
|
| 27 |
};
|
|
|
|
| 76 |
// Hide auth, show app
|
| 77 |
document.getElementById('auth-screen').style.display = 'none';
|
| 78 |
document.getElementById('app-layout').style.display = 'flex';
|
| 79 |
+
|
| 80 |
+
switchView('dashboard-view', document.querySelectorAll('.nav-item')[0]);
|
| 81 |
|
| 82 |
if (typeof initTerminal === "function") initTerminal();
|
| 83 |
if (typeof initEditor === "function") initEditor();
|
| 84 |
+
if (typeof initDashboard === "function") initDashboard();
|
| 85 |
if (typeof loadSettings === "function") loadSettings();
|
| 86 |
} else {
|
| 87 |
errDiv.style.color = "var(--error-color)";
|