mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
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:
@@ -34,3 +34,6 @@ test-results/
|
||||
|
||||
# IDE
|
||||
.idea/
|
||||
|
||||
# vite-plugin-pwa dev service worker output
|
||||
dev-dist
|
||||
|
||||
Reference in New Issue
Block a user