This commit is contained in:
seb
2026-07-31 08:34:51 +02:00
parent a95b7f4b1e
commit 797ea59bed
24 changed files with 1151 additions and 130 deletions

View File

@@ -24,6 +24,29 @@
</head>
<body>
<div id="root"></div>
<script>
(function () {
var host = location.hostname;
if (host !== 'localhost' && host !== '127.0.0.1') return;
if (!navigator.serviceWorker) return;
var hadSw = false;
navigator.serviceWorker.getRegistrations().then(function (regs) {
hadSw = regs.length > 0;
return Promise.all(regs.map(function (r) { return r.unregister(); }));
}).then(function () {
if (!window.caches) return hadSw;
return caches.keys().then(function (keys) {
return Promise.all(keys.map(function (k) { return caches.delete(k); }))
.then(function () { return hadSw; });
});
}).then(function (reload) {
if (reload && !sessionStorage.getItem('dashfront-sw-cleared')) {
sessionStorage.setItem('dashfront-sw-cleared', '1');
location.reload();
}
});
})();
</script>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>