fix: icônes PNG + fetch handler pour déclencher le prompt PWA

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Gwadaking
2026-04-14 17:29:10 -04:00
parent ad0dc92f89
commit 8114103117
8 changed files with 584 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -11,9 +11,15 @@
"lang": "fr",
"icons": [
{
"src": "/icon.svg",
"sizes": "any",
"type": "image/svg+xml",
"src": "/icon-192.png",
"sizes": "192x192",
"type": "image/png",
"purpose": "any"
},
{
"src": "/icon-512.png",
"sizes": "512x512",
"type": "image/png",
"purpose": "any maskable"
}
],

View File

@@ -1,4 +1,10 @@
// Service Worker — Sargasse-Sentry push notifications
// Service Worker — Sargasse-Sentry
// fetch handler requis par Chrome pour le critère d'installabilité PWA
self.addEventListener('fetch', (event) => {
// Pass-through : on ne met rien en cache pour l'instant (app data-driven, pas offline)
event.respondWith(fetch(event.request));
});
self.addEventListener('push', (event) => {
if (!event.data) return;