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
|
|
@ -1,7 +1,31 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
|
||||
export default defineConfig({
|
||||
base: '/maintenance/',
|
||||
plugins: [react()],
|
||||
plugins: [
|
||||
react(),
|
||||
VitePWA({
|
||||
registerType: 'autoUpdate',
|
||||
manifest: {
|
||||
name: 'Maintenance',
|
||||
short_name: 'Maint.',
|
||||
start_url: '/maintenance/',
|
||||
scope: '/maintenance/',
|
||||
display: 'standalone',
|
||||
theme_color: '#b45309',
|
||||
background_color: '#b45309',
|
||||
icons: [
|
||||
{ src: '/maintenance/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
|
||||
{ src: '/maintenance/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
|
||||
],
|
||||
},
|
||||
workbox: {
|
||||
navigateFallback: '/maintenance/index.html',
|
||||
navigateFallbackDenylist: [/\/api\//],
|
||||
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
|
||||
},
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue