Ship PWA app icons and correct the manifest theme color

This commit is contained in:
2026-06-10 01:32:52 +03:00
parent 7599acd25e
commit a5e5d1a2ad
5 changed files with 104 additions and 12 deletions
+13 -6
View File
@@ -35,18 +35,25 @@ export default defineConfig({
react(),
VitePWA({
registerType: 'prompt',
includeAssets: ['favicon.svg'],
includeAssets: ['favicon.svg', 'icon-maskable.svg', 'icon-mono.svg'],
manifest: {
name: 'Astrolabe',
short_name: 'Astrolabe',
description: 'A browser-based snippet manager for Vega-Lite visualizations.',
theme_color: '#1a1a2e',
// theme_color tints the OS/browser chrome; background_color is the splash
// behind the icon. theme_color is the app accent (`--accent`, light theme);
// background_color matches the light `--bg` the app boots into.
theme_color: '#0e7490',
background_color: '#ffffff',
display: 'standalone',
// TODO: theme_color/background_color are stale placeholders — '#1a1a2e' was
// the old --color-text hex, retired by the M1.5 token rename. Re-pick from
// the settled palette (and reconcile with light/dark) when icons land.
icons: [],
// SVG marks scale to any size — Chrome/Edge/desktop install accept SVG
// icons. (iOS home-screen still prefers a PNG apple-touch-icon; tracked as
// a known residual.) maskable = Android adaptive; monochrome = tinted mark.
icons: [
{ src: 'favicon.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'any' },
{ src: 'icon-maskable.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'maskable' },
{ src: 'icon-mono.svg', sizes: 'any', type: 'image/svg+xml', purpose: 'monochrome' },
],
},
workbox: {
// Workbox's default globPatterns omit woff2; add it so the self-hosted