new folder structure / add de translation
This commit is contained in:
parent
8aba6f5129
commit
4a0a5bac3f
35 changed files with 696 additions and 1124 deletions
32
steam-gift-manager/static/serviceworker.js
Normal file
32
steam-gift-manager/static/serviceworker.js
Normal file
|
@ -0,0 +1,32 @@
|
|||
const CACHE_NAME = 'game-key-manager-v2';
|
||||
const ASSETS = [
|
||||
'/',
|
||||
'/static/style.css',
|
||||
'/static/logo.webp',
|
||||
'/static/logo_small.webp',
|
||||
'/static/gog_logo.webp',
|
||||
'/static/forgejo.webp'
|
||||
];
|
||||
|
||||
self.addEventListener('install', (event) => {
|
||||
event.waitUntil(
|
||||
caches.open(CACHE_NAME)
|
||||
.then(cache => cache.addAll(ASSETS))
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('fetch', (event) => {
|
||||
event.respondWith(
|
||||
caches.match(event.request)
|
||||
.then(cachedResponse => cachedResponse || fetch(event.request))
|
||||
);
|
||||
});
|
||||
|
||||
self.addEventListener('activate', (event) => {
|
||||
event.waitUntil(
|
||||
caches.keys().then(keys => Promise.all(
|
||||
keys.filter(key => key !== CACHE_NAME)
|
||||
.map(key => caches.delete(key))
|
||||
))
|
||||
);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue