Update: Mejorar configuración PWA con estándares consistentes del ecosistema Nucleo
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m0s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m0s
- Agregar manifest.id, lang, dir y categories - Implementar launch_handler para ventana única - Agregar capture_links y url_handlers - Configurar workbox con clientsClaim y skipWaiting - Ajustar orientation a 'any' y mejorar display_override - Corregir purpose de iconos para separar any de maskable
This commit is contained in:
@@ -24,16 +24,31 @@ export default defineNuxtConfig({
|
||||
registerType: 'autoUpdate',
|
||||
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'icon.svg', 'offline.html'],
|
||||
manifest: {
|
||||
id: '/?app=riocata',
|
||||
name: 'RioCata - Sistema de Catación de Café',
|
||||
short_name: 'RioCata',
|
||||
description: 'Sistema de catación de café para evaluación y análisis de calidad',
|
||||
lang: 'es',
|
||||
dir: 'ltr',
|
||||
theme_color: '#ffffff',
|
||||
background_color: '#ffffff',
|
||||
display: 'standalone',
|
||||
display_override: ['window-controls-overlay'],
|
||||
orientation: 'portrait',
|
||||
display_override: ['window-controls-overlay', 'standalone'],
|
||||
orientation: 'any',
|
||||
scope: '/',
|
||||
start_url: '/',
|
||||
start_url: '/?source=pwa',
|
||||
categories: ['productivity', 'business'],
|
||||
// Control de ventanas - mantener una sola ventana al navegar
|
||||
launch_handler: {
|
||||
client_mode: 'navigate-existing'
|
||||
},
|
||||
// Capturar todos los enlaces que apunten a esta app
|
||||
capture_links: 'existing-client-navigate',
|
||||
// URL handling - nuevo estándar para manejar links a esta PWA
|
||||
handle_links: 'preferred',
|
||||
url_handlers: [
|
||||
{ origin: 'https://riocata.nucleoriofrio.com' }
|
||||
],
|
||||
icons: [
|
||||
{
|
||||
src: '/icon-72x72.png',
|
||||
@@ -69,7 +84,7 @@ export default defineNuxtConfig({
|
||||
src: '/icon-192x192.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png',
|
||||
purpose: 'any maskable'
|
||||
purpose: 'any'
|
||||
},
|
||||
{
|
||||
src: '/icon-256x256.png',
|
||||
@@ -87,7 +102,7 @@ export default defineNuxtConfig({
|
||||
src: '/icon-512x512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png',
|
||||
purpose: 'any maskable'
|
||||
purpose: 'any'
|
||||
},
|
||||
{
|
||||
src: '/icon-512x512-maskable.png',
|
||||
@@ -118,6 +133,10 @@ export default defineNuxtConfig({
|
||||
navigateFallbackDenylist: [/^\/api\//, /^\/authentik\//],
|
||||
globPatterns: ['**/*.{js,css,html,png,svg,ico,json}'],
|
||||
cleanupOutdatedCaches: true,
|
||||
// Capturar todas las navegaciones dentro del scope
|
||||
navigateFallbackAllowlist: [/^\//],
|
||||
clientsClaim: true,
|
||||
skipWaiting: true,
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /^https:\/\/authentik\.nucleoriofrio\.com\/.*/i,
|
||||
|
||||
Reference in New Issue
Block a user