Initial commit

This commit is contained in:
Richard
2026-07-31 10:08:13 +02:00
parent 652943fb7e
commit a69f31649c
7192 changed files with 924319 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
{
"short_name": "Schichtplaner",
"name": "Veranstaltungsschichtplaner",
"description": "Veranstaltungen und Schichtpläne einfach verwalten und eintragen",
"icons": [
{
"src": "pwa-icon.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any maskable"
},
{
"src": "pwa-icon.png",
"sizes": "512x512",
"type": "image/png"
}
],
"start_url": "/",
"background_color": "#0f172a",
"theme_color": "#2563eb",
"display": "standalone",
"orientation": "portrait"
}
+46
View File
@@ -0,0 +1,46 @@
const CACHE_NAME = 'schichtplaner-v1';
const ASSETS_TO_CACHE = [
'/',
'/index.html',
'/manifest.json'
];
self.addEventListener('install', (event) => {
event.waitUntil(
caches.open(CACHE_NAME).then((cache) => {
return cache.addAll(ASSETS_TO_CACHE);
})
);
self.skipWaiting();
});
self.addEventListener('activate', (event) => {
event.waitUntil(
caches.keys().then((keys) => {
return Promise.all(
keys.map((key) => {
if (key !== CACHE_NAME) {
return caches.delete(key);
}
})
);
})
);
self.clients.claim();
});
self.addEventListener('fetch', (event) => {
if (event.request.method !== 'GET' || event.request.url.includes('/api/')) {
return;
}
event.respondWith(
caches.match(event.request).then((cachedResponse) => {
if (cachedResponse) {
return cachedResponse;
}
return fetch(event.request).catch(() => {
return caches.match('/index.html');
});
})
);
});