This commit is contained in:
2025-12-07 02:49:46 +01:00
parent 37318e69fb
commit 6414802ce8
7 changed files with 1190 additions and 9 deletions

View File

@@ -3,6 +3,7 @@ import { initTabs } from './ui-tabs.js';
import { initLists } from './ui-list.js';
import { initCreate } from './ui-create.js';
import { initEditor } from './ui-editor.js';
import { initUserPanel } from './ui-user.js';
import { mountLogoutButton, ensureFloatingLogout } from './ui-auth.js';
import { apiAction } from './api.js';
@@ -18,6 +19,7 @@ async function ensureAuthenticated() {
window.location.href = '/login.php';
return false;
}
window.__currentUser = me.user;
// ✅ nur für eingeloggte Nutzer: UI freigebensss
document.documentElement.classList.remove('auth-pending');
const appRoot = document.getElementById('app');
@@ -34,6 +36,7 @@ function initAppFeatures() {
initLists();
initCreate();
initEditor();
initUserPanel();
// Logout-Buttons
mountLogoutButton('#btn-logout', { redirect: '/login.php' });
@@ -81,4 +84,3 @@ document.addEventListener('DOMContentLoaded', async () => {
});
window.addEventListener('message', handleEditorMessages);