feat(pwa): app instalável com service worker e shell offline
- manifest.webmanifest: standalone, theme/background color, ícones 192/512 any+maskable+monochrome (PNGs em web/icons) e atalho 'Nova nota' (?new=1) - sw.js: cache versionado (notas-shell-v1); navegação network-first com fallback ao shell (offline), estáticos stale-while-revalidate, /api/* e SSE sempre passthrough; activate limpa caches e notifica janelas - app.js: registro do SW, beforeinstallprompt com item 'Instalar Aplicativo…' no menu Ajuda (escondido em standalone/após instalar), toast de atualização, aviso offline/online, deep-link ?new=1 - index.html: meta tags theme-color/mobile-web-app/apple-touch-icon/manifest - server: staticHandler com MIME application/manifest+json e Cache-Control no-cache para /sw.js; embed inclui manifest, sw e ícones - README: seção PWA + orientação de serving (Go atual e equivalente Rust)
This commit is contained in:
1 parent
63fd024f68
commit
18d33ed141
12 files changed
+243
-3
No files matched your search
+2
-2
@@ -3,7 +3,7 @@ package web
|
||||
|
||||
import "embed"
|
||||
|
||||
// FS contém index.html, css/ e js/ na raiz.
|
||||
// FS contém index.html, css/, js/, icons/, sw.js e manifest.webmanifest na raiz.
|
||||
//
|
||||
//go:embed index.html css js
|
||||
//go:embed index.html manifest.webmanifest sw.js css js icons
|
||||
var FS embed.FS
|
||||
Reference in new issue
Block a user