Refactor UI auth flow, remove uploads app files

Rework client UI state: move and update showLogin/showApp in public/app.js to explicitly set display styles when toggling screens and ensure user info and file load on app show. Remove the theme toggle from public/index.html and simplify CSS by collapsing color variable definitions (dark-theme-focused) in public/style.css. Add a VS Code workspace file. Remove the old uploads/Think app (Dockerfile, package.json, server.js and associated lockfile).
This commit is contained in:
Toni
2026-02-09 11:08:59 +01:00
parent 9f23fd42fa
commit 3fc28af508
8 changed files with 31 additions and 2296 deletions

View File

@@ -65,18 +65,7 @@ document.getElementById('logout-btn').addEventListener('click', async () => {
window.location.reload();
});
function showLogin() {
loginScreen.classList.remove('hidden');
appScreen.classList.add('hidden');
}
function showApp() {
loginScreen.classList.add('hidden');
appScreen.classList.remove('hidden');
document.getElementById('user-display').textContent = currentUser.username;
loadFiles();
updateViewIcon();
}
// --- View Mode ---
function toggleView() {
@@ -94,6 +83,27 @@ function updateViewIcon() {
}
viewToggleBtn.addEventListener('click', toggleView);
// --- Auth / UI State ---
function showLogin() {
// Force style to ensure hidden/visible
loginScreen.classList.remove('hidden');
loginScreen.style.display = 'flex';
appScreen.classList.add('hidden');
}
function showApp() {
loginScreen.classList.add('hidden');
loginScreen.style.display = 'none'; // Force hide
appScreen.classList.remove('hidden');
document.getElementById('user-display').textContent = currentUser.username;
loadFiles();
updateViewIcon();
}
// --- Files ---
async function loadFiles(path = currentPath) {
try {