- Static web app manifest (standalone, brand-token colours) with 192/512 "any" icons and a 512 maskable icon, generated as real PNGs by admin/scripts/generate-icons.mjs (zlib only, no network). - Hand-written public/sw.js: precaches the shell on install, prunes stale caches on activate, falls back to the cached index.html for offline navigations, serves same-origin static assets cache-first; never handles cross-origin or non-GET requests. - registerServiceWorker() registers /sw.js only in production builds and logs on failure; called from main.tsx. index.html links the manifest, theme colour and apple-touch-icon. - Vitest coverage for manifest installability, icon PNG dimensions, the worker's install/activate/fetch behaviour and the production guard. Task: 96ab3c0b-7554-4098-8af1-2be7815f8929 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
15 lines
507 B
JSON
15 lines
507 B
JSON
{
|
|
"name": "NestQuest Admin",
|
|
"short_name": "NestQuest",
|
|
"start_url": "/",
|
|
"scope": "/",
|
|
"display": "standalone",
|
|
"background_color": "#f4f4f6",
|
|
"theme_color": "#3b3ab8",
|
|
"icons": [
|
|
{ "src": "/icons/icon-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any" },
|
|
{ "src": "/icons/icon-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any" },
|
|
{ "src": "/icons/icon-maskable-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
|
|
]
|
|
}
|