Files
dashfront/index.html
2026-10-05 01:01:03 +02:00

62 lines
1.8 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<link rel="apple-touch-icon" href="/icons/icon-192.png" />
<meta name="theme-color" content="#1d4ed8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Dashfront</title>
<style>
/* First-paint colors. Mirrored from src/colors.js (MAIN_BACKGROUND /
THEME_COLOR) because this file must paint before the JS bundle loads.
Once the app boots, src/colors.js takes over via CSS custom properties. */
html,
body,
#root {
min-height: 100%;
background-color: #82b8b4;
}
html,
body {
overscroll-behavior-y: none;
touch-action: manipulation;
}
html {
scrollbar-gutter: stable;
}
</style>
</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>