feat(client): add PWA support with installability and cover caching

Add vite-plugin-pwa with Workbox in generateSW mode. Includes a web app
manifest (standalone display, shortcuts for Dashboard/Libraries/Settings),
iOS meta tags, and a service worker that pre-caches the app shell and uses
CacheFirst for book cover and thumbnail endpoints (max 200 entries, 30-day TTL).

Add useInstallPrompt composable that captures the beforeinstallprompt event
and exposes isInstallable/installApp. Wire an install button into SidebarFooter
that appears only when the browser signals the app is installable.

Generate PWA icons (64, 192, 512, maskable-512, apple-touch-icon-180) from a
new pwa-icon-source.svg using @vite-pwa/assets-generator with minimal2023Preset.
Add dev-dist to .gitignore to exclude the dev-mode SW output.
This commit is contained in:
neon
2026-05-12 20:53:21 +00:00
parent 431053e510
commit 22ac06ecd7
16 changed files with 4136 additions and 3 deletions
+3
View File
@@ -34,3 +34,6 @@ test-results/
# IDE
.idea/
# vite-plugin-pwa dev service worker output
dev-dist