- Add PWA icons in multiple sizes (192px, 512px, maskable) - Configure manifest.webmanifest with proper icon references - Implement PWA install prompt with custom notification - Add manual manifest route for development compatibility - Update meta tags for iOS and Android PWA support - Configure service worker with music and image caching - Enable auto-updates and offline functionality PWA now fully installable on all platforms with proper branding.
48 lines
1.2 KiB
TypeScript
48 lines
1.2 KiB
TypeScript
export default defineEventHandler(async (event) => {
|
|
// Set proper content type for manifest
|
|
setHeader(event, 'Content-Type', 'application/manifest+json')
|
|
setHeader(event, 'Cache-Control', 'public, max-age=0, must-revalidate')
|
|
|
|
const manifest = {
|
|
name: 'RepoDructor Music Player',
|
|
short_name: 'RepoDructor',
|
|
description: 'A beautiful glassmorphism music player for your local network',
|
|
theme_color: '#8b5cf6',
|
|
background_color: '#0f172a',
|
|
display: 'standalone',
|
|
orientation: 'portrait',
|
|
scope: '/',
|
|
start_url: '/',
|
|
categories: ['music', 'entertainment'],
|
|
lang: 'es',
|
|
dir: 'ltr',
|
|
icons: [
|
|
{
|
|
src: '/logo-192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png',
|
|
purpose: 'any'
|
|
},
|
|
{
|
|
src: '/logo-512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
purpose: 'any'
|
|
},
|
|
{
|
|
src: '/logo-maskable-512.png',
|
|
sizes: '512x512',
|
|
type: 'image/png',
|
|
purpose: 'maskable'
|
|
},
|
|
{
|
|
src: '/logo-192.png',
|
|
sizes: '192x192',
|
|
type: 'image/png',
|
|
purpose: 'maskable'
|
|
}
|
|
]
|
|
}
|
|
|
|
return manifest
|
|
}) |