release: publish saldo 0.1.0

This commit is contained in:
2026-04-21 21:17:36 +02:00
commit 6f5e704739
95 changed files with 9196 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
const CACHE_NAME = "saldo-shell-v1";
const APP_SHELL = [
"/",
"/static/css/app.css",
"/static/js/app.js",
"/static/manifest.json",
];
self.addEventListener("install", (event) => {
event.waitUntil(caches.open(CACHE_NAME).then((cache) => cache.addAll(APP_SHELL)));
});
self.addEventListener("fetch", (event) => {
if (event.request.method !== "GET") return;
event.respondWith(
caches.match(event.request).then((response) => response || fetch(event.request))
);
});
self.addEventListener("push", (event) => {
const data = event.data ? event.data.json() : { title: "Saldo", body: "Neue Erinnerung" };
event.waitUntil(
self.registration.showNotification(data.title, {
body: data.body,
icon: "/static/icons/landmark.svg",
badge: "/static/icons/bell.svg",
data: { url: data.url || "/" },
})
);
});
self.addEventListener("notificationclick", (event) => {
event.notification.close();
event.waitUntil(clients.openWindow(event.notification.data.url || "/"));
});