Auto-Reload: nur beim Seitenwechsel, nicht mitten in der Arbeit

This commit is contained in:
2026-05-30 01:47:42 +02:00
parent 7768aebe65
commit cf415d2b76
2 changed files with 39 additions and 29 deletions

View File

@@ -2381,7 +2381,11 @@ export default function App() {
return window.matchMedia('(display-mode: standalone)').matches && !sessionStorage.getItem('splash_shown');
});
const [user,setUser]=useState(null);
const [active,setActive]=useState('dashboard');
const [active,setActiveRaw]=useState('dashboard');
const setActive = (page) => {
import('./main.jsx').then(m => m.reloadIfNewBuild?.()).catch(()=>{});
setActiveRaw(page);
};
const [toastMsg,setToastMsg]=useState({msg:'',type:'success'});
const [updateInfo,setUpdateInfo]=useState(null);
const [showUpd,setShowUpd]=useState(false);