From ec6fc53c81095109251335a0aa10d2460e7911ca Mon Sep 17 00:00:00 2001 From: Alex Mueller Date: Sun, 13 Sep 2026 12:05:16 +0200 Subject: [PATCH] fix(landing): fix syntax error in app_auth.js and restore landing page login and action buttons --- assets/app_auth.js | 14 ++++++++------ index.html | 14 +++++++------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/assets/app_auth.js b/assets/app_auth.js index 0749463..60817a9 100644 --- a/assets/app_auth.js +++ b/assets/app_auth.js @@ -462,12 +462,8 @@ const footerLoginBtn = document.getElementById('footer-cta-login'); if (footerLoginBtn) footerLoginBtn.style.display = 'inline-flex'; - if (landingBanner) landingBanner.style.display = 'none'; if (navDashLink) navDashLink.style.display = 'none'; - if (mobDashLink) mobDashLink.style.display = 'none'; - const mobLogoutBtn = document.getElementById('mobile-drawer-logout-btn'); - if (mobLogoutBtn) mobLogoutBtn.style.display = 'none'; } // 🔒 Strikter Rollen-Filter für Dozenten- und Admin-Funktionen @@ -713,7 +709,7 @@ }; // Initialisierung beim Laden des DOMs - document.addEventListener('DOMContentLoaded', () => { + function initAuth() { window.AUTH.updateUI(); window.AUTH.checkStatus(); window.AUTH.fetchMe(); @@ -727,5 +723,11 @@ window.location.replace('dashboard.html'); } } - }); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', initAuth); + } else { + initAuth(); + } })(); diff --git a/index.html b/index.html index 98f3009..933df3c 100644 --- a/index.html +++ b/index.html @@ -10,8 +10,8 @@ - - + +