diff --git a/backend/static/js/app.js b/backend/static/js/app.js index c863241..c5620fe 100644 --- a/backend/static/js/app.js +++ b/backend/static/js/app.js @@ -193,12 +193,28 @@ const App = (() => { } function _openSidebar() { - document.getElementById('sidebar')?.classList.add('open'); + const sidebar = document.getElementById('sidebar'); + if (!sidebar) return; + // Inline-Styles: unabhängig vom CSS-Cache-Stand + sidebar.style.cssText = [ + 'display:flex', + 'position:fixed', + 'top:0', 'left:0', 'bottom:0', + 'width:240px', + 'z-index:2000', + 'background:var(--c-surface,#fff)', + 'flex-direction:column', + 'overflow:hidden', + 'box-shadow:4px 0 24px rgba(0,0,0,0.22)', + 'border-right:1px solid var(--c-border-light,#eee)', + ].join(';'); document.getElementById('sidebar-backdrop')?.classList.add('visible'); } function _closeSidebar() { - document.getElementById('sidebar')?.classList.remove('open'); + const sidebar = document.getElementById('sidebar'); + if (!sidebar) return; + sidebar.style.cssText = ''; // alle Inline-Styles weg → CSS übernimmt wieder document.getElementById('sidebar-backdrop')?.classList.remove('visible'); } diff --git a/backend/static/sw.js b/backend/static/sw.js index becba5a..6f6b7c6 100644 --- a/backend/static/sw.js +++ b/backend/static/sw.js @@ -3,7 +3,7 @@ Offline-Cache + Push Notifications ============================================================ */ -const CACHE_VERSION = 'by-v30'; +const CACHE_VERSION = 'by-v31'; const CACHE_STATIC = `${CACHE_VERSION}-static`; // Diese Dateien werden beim Install gecacht (App Shell) @@ -40,6 +40,9 @@ self.addEventListener('activate', event => { keys.filter(k => k !== CACHE_STATIC).map(k => caches.delete(k)) )) .then(() => self.clients.claim()) + // Alle offenen Fenster neu laden, damit neues CSS/JS aktiv wird + .then(() => self.clients.matchAll({ type: 'window' })) + .then(clients => clients.forEach(c => c.navigate(c.url))) ); });