Add PWA manifest + update banner to maintenance app
Wire up vite-plugin-pwa so Docker builds generate the web manifest and service worker (was missing, causing installs to show portal icon). Adds UpdateBanner with version-based polling via health endpoint. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
79eba484e0
commit
06d1d01f91
6 changed files with 139 additions and 20 deletions
|
|
@ -20,6 +20,7 @@ const __dirname = dirname(fileURLToPath(import.meta.url))
|
|||
const UPLOADS_DIR = join(__dirname, '..', 'uploads')
|
||||
|
||||
const app = Fastify({ logger: true, trustProxy: true })
|
||||
const startedAt = Date.now()
|
||||
|
||||
await app.register(cookie)
|
||||
await app.register(cors, {
|
||||
|
|
@ -33,7 +34,7 @@ await app.register(staticFiles, {
|
|||
decorateReply: false,
|
||||
})
|
||||
|
||||
app.get('/health', async () => ({ status: 'healthy' }))
|
||||
app.get('/health', async () => ({ status: 'healthy', version: process.env.BUILD_VERSION || String(startedAt) }))
|
||||
|
||||
await app.register(locationRoutes)
|
||||
await app.register(taskRoutes)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue