Complete PWA implementation with custom icons

- 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.
This commit is contained in:
2025-08-03 18:08:06 -06:00
parent d96e992a07
commit 9b7d653c01
15 changed files with 380 additions and 353 deletions

View File

@@ -0,0 +1,48 @@
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
})