57 lines
1.7 KiB
HTML
57 lines
1.7 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="#3b5bdb" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
|
<title>Dashfront</title>
|
|
<style>
|
|
html,
|
|
body,
|
|
#root {
|
|
min-height: 100%;
|
|
background-color: #c5ddd8;
|
|
}
|
|
|
|
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>
|