- web/public/manifest.json with display=standalone, theme_color=#faff69, 192+512 icons - web/public/sw.js with app-shell cache strategy (API calls network-only) - web/public/icons/icon-192.png and icon-512.png generated via gen-icons.cjs - web/scripts/gen-icons.cjs pure-Node.js PNG icon generator (black canvas, volt H monogram) - web/src/hooks/usePWA.ts registers service worker on app load - web/index.html: added theme-color meta tag - web/src/App.tsx: calls usePWA() hook
28 lines
791 B
TypeScript
28 lines
791 B
TypeScript
import { QueryClientProvider } from '@tanstack/react-query'
|
|
import { RouterProvider } from '@tanstack/react-router'
|
|
import { Toaster } from 'react-hot-toast'
|
|
import { queryClient } from '@/lib/queryClient'
|
|
import { router } from '@/router'
|
|
import { usePWA } from '@/hooks/usePWA'
|
|
|
|
export function App() {
|
|
usePWA()
|
|
return (
|
|
<QueryClientProvider client={queryClient}>
|
|
<RouterProvider router={router} />
|
|
<Toaster
|
|
position="bottom-right"
|
|
toastOptions={{
|
|
style: {
|
|
background: '#141414',
|
|
color: '#ffffff',
|
|
border: '1px solid rgba(65,65,65,0.8)',
|
|
},
|
|
success: {
|
|
iconTheme: { primary: '#faff69', secondary: '#000000' },
|
|
},
|
|
}}
|
|
/>
|
|
</QueryClientProvider>
|
|
)
|
|
}
|