diff --git a/nuxt4/app/components/auth/ApplicationsList.vue b/nuxt4/app/components/auth/ApplicationsList.vue index 4feca72..77b4c4e 100644 --- a/nuxt4/app/components/auth/ApplicationsList.vue +++ b/nuxt4/app/components/auth/ApplicationsList.vue @@ -311,7 +311,14 @@ const refreshInterval = setInterval(() => { // En desktop, siempre abrir en nueva ventana para lanzar PWAs // En móvil, respetar la configuración de la app const shouldOpenInNewTab = (app: Application): boolean => { - return isDesktop.value || app.openInNewTab + const result = isDesktop.value || app.openInNewTab + console.log('[ApplicationsList] shouldOpenInNewTab:', { + appName: app.name, + isDesktop: isDesktop.value, + appOpenInNewTab: app.openInNewTab, + result + }) + return result } // Limpiar interval cuando el componente se desmonte diff --git a/nuxt4/app/composables/useDeviceType.ts b/nuxt4/app/composables/useDeviceType.ts index 9659797..8f948ce 100644 --- a/nuxt4/app/composables/useDeviceType.ts +++ b/nuxt4/app/composables/useDeviceType.ts @@ -13,9 +13,19 @@ export const useDeviceType = () => { // Establecer valor inicial isDesktop.value = mediaQuery.matches + console.log('[useDeviceType] Initialized:', { + isDesktop: isDesktop.value, + windowWidth: window.innerWidth, + mediaQueryMatches: mediaQuery.matches + }) + // Escuchar cambios en el tamaño de pantalla const handleChange = (e: MediaQueryListEvent) => { isDesktop.value = e.matches + console.log('[useDeviceType] Changed:', { + isDesktop: isDesktop.value, + windowWidth: window.innerWidth + }) } mediaQuery.addEventListener('change', handleChange)