PWA: Interceptar enlaces para navegación en misma ventana
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 54s
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 54s
- Agregar capture_links al manifest para captura automática - Configurar clientsClaim y skipWaiting en workbox - Plugin de cliente para interceptar clics en enlaces - Interceptar window.open() para enlaces internos - Solo activo cuando la app corre como PWA instalada - Usar router de Nuxt para navegación interna fluida - Detectar display-mode standalone y window-controls-overlay
This commit is contained in:
@@ -37,10 +37,12 @@ export default defineNuxtConfig({
|
||||
theme_color: '#00DC82',
|
||||
background_color: '#ffffff',
|
||||
display: 'standalone',
|
||||
display_override: ['window-controls-overlay'],
|
||||
display_override: ['window-controls-overlay', 'standalone'],
|
||||
orientation: 'portrait',
|
||||
scope: '/',
|
||||
start_url: '/',
|
||||
start_url: '/?source=pwa',
|
||||
// Capturar todos los enlaces que apunten a esta app
|
||||
capture_links: 'existing-client-navigate',
|
||||
icons: [
|
||||
{
|
||||
src: '/icon-192x192.png',
|
||||
@@ -83,6 +85,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