Add PWA infrastructure for iOS notification support

- Add manifest.json for proper PWA installation
- Add service worker (sw.js) for push notification handling
- Add ServiceWorkerProvider to register SW and manage notifications
- Generate PNG icons (192x192, 512x512) for iOS compatibility
- Update settings to show notification status and test button
- Use service worker showNotification for iOS Safari compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Gemini Agent
2026-01-25 00:49:05 +00:00
parent e35545b156
commit ad8b45ee1f
8 changed files with 311 additions and 13 deletions

30
public/manifest.json Normal file
View File

@@ -0,0 +1,30 @@
{
"name": "Quiet Thanks",
"short_name": "Quiet Thanks",
"description": "A calm, private gratitude and mood log",
"start_url": "/",
"display": "standalone",
"background_color": "#0a0a0a",
"theme_color": "#0a0a0a",
"orientation": "portrait-primary",
"icons": [
{
"src": "/icons/icon.svg",
"sizes": "any",
"type": "image/svg+xml",
"purpose": "any maskable"
},
{
"src": "/icons/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/icons/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"categories": ["lifestyle", "health"],
"id": "quiet-thanks-pwa"
}