Fix: Sidebar via JS-Inline-Styles (SW-Cache-unabhängig) + SW force-navigate
_openSidebar() setzt nun direkt style.cssText statt CSS-Klassen, damit stale CSS-Cache keinen Einfluss hat. SW by-v30 → by-v31 mit clients.navigate() im activate-Handler für automatischen Reload.
This commit is contained in:
parent
40b802ae86
commit
b6fae96334
2 changed files with 22 additions and 3 deletions
|
|
@ -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');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue