added new tablet mode for creating shipping notes

This commit is contained in:
2025-08-05 13:32:50 +02:00
parent 1c4c7368a2
commit dff3a4f5b8
11 changed files with 260 additions and 21 deletions
@@ -0,0 +1,32 @@
const CACHE_NAME = 'lager-system-cache-v1';
const urlsToCache = [
'.',
'https://cdn.jsdelivr.net/npm/vue@3.4.27/dist/vue.global.min.js',
'https://cdn.tailwindcss.com',
'/assets/images/xinon-full.png',
'/assets/icons/icon-192x192.png',
'/assets/icons/icon-512x512.png'
];
self.addEventListener('install', event => {
event.waitUntil(
caches.open(CACHE_NAME).then(cache => cache.addAll(urlsToCache))
);
});
self.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request).then(response => response || fetch(event.request))
);
});
self.addEventListener('activate', event => {
const cacheWhitelist = [CACHE_NAME];
event.waitUntil(
caches.keys().then(cacheNames => Promise.all(
cacheNames
.filter(cacheName => !cacheWhitelist.includes(cacheName))
.map(cacheName => caches.delete(cacheName))
))
);
});