Spaces:
Running
Running
Upload 7 files
Browse files- app.n8EEPJBq.js +0 -0
- index.html +1 -1
- sw.js +1 -37
app.n8EEPJBq.js
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
<link rel="manifest" href="./manifest.webmanifest">
|
| 9 |
<link rel="icon" href="./icons/icon-192.png">
|
| 10 |
<title>LeanCut — Monthly Planner</title>
|
| 11 |
-
<script type="module" crossorigin src="./app.
|
| 12 |
<link rel="stylesheet" crossorigin href="./assets/build_entry._h0TfevK.css">
|
| 13 |
</head>
|
| 14 |
<body>
|
|
|
|
| 8 |
<link rel="manifest" href="./manifest.webmanifest">
|
| 9 |
<link rel="icon" href="./icons/icon-192.png">
|
| 10 |
<title>LeanCut — Monthly Planner</title>
|
| 11 |
+
<script type="module" crossorigin src="./app.n8EEPJBq.js"></script>
|
| 12 |
<link rel="stylesheet" crossorigin href="./assets/build_entry._h0TfevK.css">
|
| 13 |
</head>
|
| 14 |
<body>
|
sw.js
CHANGED
|
@@ -1,37 +1 @@
|
|
| 1 |
-
const CACHE
|
| 2 |
-
const ASSETS = [
|
| 3 |
-
'./',
|
| 4 |
-
'./index.html',
|
| 5 |
-
'./manifest.webmanifest',
|
| 6 |
-
'./icons/icon-192.png',
|
| 7 |
-
'./icons/icon-512.png'
|
| 8 |
-
];
|
| 9 |
-
|
| 10 |
-
self.addEventListener('install', e => {
|
| 11 |
-
e.waitUntil(
|
| 12 |
-
caches.open(CACHE).then(c => c.addAll(ASSETS)).then(() => self.skipWaiting())
|
| 13 |
-
);
|
| 14 |
-
});
|
| 15 |
-
|
| 16 |
-
self.addEventListener('activate', e => {
|
| 17 |
-
e.waitUntil(
|
| 18 |
-
caches.keys().then(keys =>
|
| 19 |
-
Promise.all(keys.filter(k => k !== CACHE).map(k => caches.delete(k)))
|
| 20 |
-
).then(() => self.clients.claim())
|
| 21 |
-
);
|
| 22 |
-
});
|
| 23 |
-
|
| 24 |
-
self.addEventListener('fetch', e => {
|
| 25 |
-
if (e.request.method !== 'GET') return;
|
| 26 |
-
e.respondWith(
|
| 27 |
-
caches.match(e.request).then(cached => {
|
| 28 |
-
if (cached) return cached;
|
| 29 |
-
return fetch(e.request).then(res => {
|
| 30 |
-
if (!res || res.status !== 200 || res.type === 'opaque') return res;
|
| 31 |
-
const clone = res.clone();
|
| 32 |
-
caches.open(CACHE).then(c => c.put(e.request, clone));
|
| 33 |
-
return res;
|
| 34 |
-
}).catch(() => caches.match('./index.html'));
|
| 35 |
-
})
|
| 36 |
-
);
|
| 37 |
-
});
|
|
|
|
| 1 |
+
const CACHE="lean-cut-react-v1";const ASSETS=["./","./index.html","./app.js","./styles.css","./manifest.webmanifest","./icon.svg"];self.addEventListener("install",e=>e.waitUntil(caches.open(CACHE).then(c=>c.addAll(ASSETS)).then(()=>self.skipWaiting())));self.addEventListener("activate",e=>e.waitUntil(self.clients.claim()));self.addEventListener("fetch",e=>e.respondWith(caches.match(e.request).then(r=>r||fetch(e.request).then(res=>{const c=res.clone();caches.open(CACHE).then(x=>x.put(e.request,c));return res}).catch(()=>caches.match("./index.html")))))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|