Add PWA install support for mobile and desktop

Register service worker, install prompt UI, iOS meta tags, and document install steps in DEPLOY.md.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-05 17:41:51 +08:00
parent a8be586652
commit f663867a25
11 changed files with 4923 additions and 39 deletions
+2
View File
@@ -104,6 +104,8 @@ const PUBLIC_PATHS = new Set([
function isPublicPath(reqPath) {
if (PUBLIC_PATHS.has(reqPath)) return true
if (reqPath.startsWith('/assets/')) return true
if (reqPath === '/sw.js' || reqPath.endsWith('.webmanifest')) return true
if (/^\/workbox-[\w-]+\.js$/.test(reqPath)) return true
return false
}