104 lines
3.0 KiB
HTML
104 lines
3.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<base href="/" />
|
|
|
|
<meta charset="UTF-8">
|
|
<meta content="IE=Edge" http-equiv="X-UA-Compatible">
|
|
<meta name="description" content="MapFlow">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<meta name="theme-color" content="#05030B">
|
|
<script src="https://telegram.org/js/telegram-web-app.js"></script>
|
|
|
|
<meta name="mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<meta name="apple-mobile-web-app-title" content="MapFlow">
|
|
<link rel="apple-touch-icon" href="icons/Icon-192.png?v={{sw_version}}">
|
|
|
|
<link rel="icon" type="image/png" href="favicon.png?v={{sw_version}}"/>
|
|
|
|
<title>MapFlow</title>
|
|
<link rel="manifest" href="manifest.json">
|
|
<style>
|
|
#sw-loading {
|
|
background: #05030B !important;
|
|
color: #F8EEFF !important;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
background: #05030B;
|
|
color: #F8EEFF;
|
|
min-height: 100%;
|
|
margin: 0;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body style="background: #05030B;">
|
|
<script>
|
|
if ('serviceWorker' in navigator) {
|
|
var refreshing = false;
|
|
var hadServiceWorkerController = !!navigator.serviceWorker.controller;
|
|
|
|
navigator.serviceWorker.addEventListener('controllerchange', function () {
|
|
if (!hadServiceWorkerController) {
|
|
hadServiceWorkerController = true;
|
|
return;
|
|
}
|
|
if (refreshing) {
|
|
return;
|
|
}
|
|
refreshing = true;
|
|
window.location.reload();
|
|
});
|
|
|
|
window.addEventListener('sw-update-available', function () {
|
|
navigator.serviceWorker.getRegistration().then(function (registration) {
|
|
if (registration && registration.waiting) {
|
|
registration.waiting.postMessage({ type: 'skipWaiting' });
|
|
}
|
|
});
|
|
});
|
|
|
|
window.addEventListener('load', function () {
|
|
navigator.serviceWorker.getRegistrations().then(function (registrations) {
|
|
registrations.forEach(function (registration) {
|
|
var worker = registration.active || registration.waiting || registration.installing;
|
|
var workerPath = worker ? new URL(worker.scriptURL).pathname : '';
|
|
if (worker && !workerPath.endsWith('/sw.js')) {
|
|
registration.unregister();
|
|
}
|
|
});
|
|
});
|
|
|
|
if (window.caches) {
|
|
caches.keys().then(function (keys) {
|
|
keys.forEach(function (key) {
|
|
if (
|
|
key === 'flutter-app-cache' ||
|
|
key === 'flutter-temp-cache' ||
|
|
key === 'flutter-app-manifest'
|
|
) {
|
|
caches.delete(key);
|
|
}
|
|
});
|
|
});
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
<script
|
|
defer
|
|
data-sw-bootstrap
|
|
src="bootstrap.js"
|
|
data-config='{
|
|
"logo": "icons/Icon-192.png?v={{sw_version}}",
|
|
"title": "MapFlow",
|
|
"theme": "dark",
|
|
"color": "#FF2D75",
|
|
"showPercentage": true
|
|
}'
|
|
></script>
|
|
</body>
|
|
</html>
|