mirror of
https://github.com/bookorbit/bookorbit.git
synced 2026-11-03 00:11:37 -06:00
22ac06ecd7
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.
21 lines
824 B
HTML
21 lines
824 B
HTML
<!doctype html>
|
|
<html lang="">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link rel="icon" href="/favicon.ico" sizes="any" />
|
|
<link rel="icon" href="/pwa-icon-source.svg" type="image/svg+xml" />
|
|
<link rel="apple-touch-icon" href="/apple-touch-icon-180x180.png" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="apple-mobile-web-app-capable" content="yes" />
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
|
|
<meta name="apple-mobile-web-app-title" content="BookOrbit" />
|
|
<title>BookOrbit</title>
|
|
<!-- Blocking theme init — must run before first paint to prevent FOUC -->
|
|
<script src="/theme-init.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="app"></div>
|
|
<script type="module" src="/src/main.ts"></script>
|
|
</body>
|
|
</html>
|