PWA-Reload sauber: nur bei App-Oeffnen oder Dashboard-Klick, niemals bei Eingaben; version.txt im Build, SW v4, Carousel 4 Icons, Kalender ohne Komma
This commit is contained in:
@@ -2379,7 +2379,9 @@ export default function App() {
|
||||
const [user,setUser]=useState(null);
|
||||
const [active,setActiveRaw]=useState('dashboard');
|
||||
const setActive = (page) => {
|
||||
if (window.__newBuildAvailable) { window.location.reload(); return; }
|
||||
// Reload nur beim Klick auf Dashboard und nur wenn ein neuer Build vorliegt
|
||||
// und keine Eingabe aktiv ist (schützt ungespeicherte Eingaben)
|
||||
if (page === 'dashboard' && window.__newBuildAvailable && window.__safeReloadIfNewBuild?.()) return;
|
||||
setActiveRaw(page);
|
||||
};
|
||||
const [toastMsg,setToastMsg]=useState({msg:'',type:'success'});
|
||||
|
||||
Reference in New Issue
Block a user