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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user