Commit Graph

23 Commits

Author SHA1 Message Date
cf00b0340e Activar filtro Presentes por defecto
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 57s
2025-12-05 12:20:09 -06:00
eb5fa191c1 Agregar filtro Solo Presentes y reorganizar filtros
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 57s
- Reorganizar filtros (ID, Teléfono, Empleados, Presentes) en una fila con wrap
- Agregar checkbox 'Presentes' basado en tabla Asistencias de Supabase
- Crear endpoint /api/contacts/presentes que consulta última asistencia sin salida
- Integrar filtro de presentes en useContacts con carga lazy
2025-12-05 12:17:15 -06:00
39a01d351b Corregir componentes de contactos y filtrar solo con teléfono
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 1m0s
- Renombrar componentes: ContactsFilters→Filters, ContactItem→Item, ContactsList→List
- Actualizar referencias en List.vue y app.vue
- Filtrar solo contactos con teléfono registrado
- Los filtros ahora deberían mostrarse correctamente
2025-12-05 12:10:16 -06:00
59f25adabe Agregar sección Contactos con UTabs y conexión a Metabase
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 2m37s
- Implementar UTabs (Contactos, Aplicaciones, Perfil) en app.vue
- Crear componentes ContactsList, ContactsFilters, ContactItem
- Agregar server routes para obtener contactos via Metabase API
- Sistema de aliases por usuario guardados en archivos JSON
- Filtros: nombre (fuzzy search), ID, teléfono, empleado
- Click en contacto abre WhatsApp
- Estilo glassmorphism consistente con la app
2025-12-05 11:41:26 -06:00
8109f7e1d0 Implementar sistema completo de captura y gestión de avatares
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 57s
- Agregar CameraCapture.vue con soporte multi-dispositivo
  * Soporte para múltiples cámaras (frontal/trasera)
  * Manejo robusto de permisos y errores
  * Preview y confirmación de foto
  * Detección automática de capacidades del dispositivo

- Crear endpoint /api/avatar/upload para subir avatares
  * Validación de tipo y tamaño de archivo
  * Almacenamiento en /public/avatars/
  * Actualización de atributos en Authentik
  * Limpieza automática de avatares antiguos

- Actualizar UserProfileForm con gestión de avatar
  * Integración con CameraCapture en modal
  * Preview del avatar actual con MsnAvatar
  * Opciones para cambiar y eliminar avatar

- Actualizar useAuthentik para avatares personalizados
  * Carga de atributos completos del usuario
  * Soporte para avatar_url desde Authentik
  * Fallback a UI Avatars si no hay custom avatar
2025-10-17 16:35:59 -06:00
6b87902119 Implementar avatar estilo Windows Live Messenger con sistema de presencia
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 55s
- Agregar componente MsnAvatar con marco SVG de grosor variable
- Implementar degradados radiales estilo Frutiger Aero
- Agregar composable usePresence con detección de inactividad
- Incluir selector de estados: Online, Away, Busy, Offline
- Actualizar UserHeader para usar el nuevo avatar
2025-10-17 13:56:59 -06:00
305143b433 Fix: Usar pointer device para detectar desktop en lugar de ancho
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 56s
- Cambiar detección de desktop de min-width a (pointer: fine)
- Esto detecta si tiene mouse/trackpad (desktop) vs touch (móvil)
- Más confiable para PWAs que se abren con ancho fijo
- Mantener ancho como fallback para compatibilidad
2025-10-17 05:13:00 -06:00
d08bd81c73 Debug: Agregar logs para detectar problema con target='_blank'
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 58s
- Agregar logs en useDeviceType para ver detección de desktop
- Agregar logs en shouldOpenInNewTab para ver resultado
- Esto ayudará a diagnosticar por qué no se abren nuevas ventanas
2025-10-17 05:06:47 -06:00
99062559c4 Desktop: Abrir app-items en nueva ventana para lanzar PWAs
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 58s
- Crear composable useDeviceType para detectar desktop/móvil
- Modificar ApplicationsList para usar target='_blank' en desktop
- Ajustar pwa-link-handler para permitir nuevas ventanas en desktop
- En móvil mantener comportamiento original según openInNewTab
2025-10-17 04:57:51 -06:00
9a3dc1f0e6 Feature: Mejorar UX del tema y persistencia
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 55s
- Mover botón editar al lado del nombre (siempre visible, sutil)
- Quitar efecto hover del header
- Detectar tema del sistema operativo automáticamente
- Actualizar theme-color dinámicamente (azul cielo día / oscuro noche)
- Usar cookies para persistir tema y filtros (1 año)
- Sincronizar filtros de apps con cookies
2025-10-16 23:03:43 -06:00
00c9d9578a Fix: Sincronizar tema con clase dark de Nuxt UI
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 53s
- Agregar función applyThemeClass para sincronizar con HTML
- Aplicar clase dark/light al elemento HTML
- Agregar watcher para actualizar clase en cambios de tema
- Inicializar clase correcta en onMounted
2025-10-16 22:22:51 -06:00
01139f4415 Feature: Rediseño completo con tema día/noche y fondos animados
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 54s
- Implementar sistema de tema día/noche con persistencia en localStorage
- Crear componente AnimatedBackground con paisajes SVG animados
- Generar todos los assets SVG desde cero (sol, luna, estrellas, nubes, montañas)
- Añadir animaciones suaves para nubes, estrellas y elementos del paisaje
- Rediseñar UserHeader como componente principal clickeable
- Integrar modal de edición de perfil en el header
- Reorganizar layout principal mostrando solo aplicaciones
- Mejorar diseño de ApplicationsList con glassmorphism
- Implementar efectos hover y transiciones elegantes
- Diseño responsive mobile-first
- Diferencias visuales notorias entre modo día y noche
2025-10-16 21:46:22 -06:00
43bcf4a647 Add modular group verification system with frontend and backend checks
This commit implements a comprehensive, reusable group verification system:

Components:
- GroupCheckButton: Base component for group verification
- 7 specialized buttons: 3 real groups (authentik Admins, grupo-prueba, lvl0), 1 public access test, 2 system verification buttons
- All buttons support both frontend and backend verification modes

Backend:
- New API endpoint /api/auth/check-group for server-side group validation
- Reads Authentik headers and validates group membership

Frontend:
- Enhanced useAuthentik composable with hasGroup() and checkGroupBackend() methods
- Toast notifications for all verification results
- Smooth animations and color-coded visual feedback

UI Improvements:
- Organized layout with cards for different verification types
- Grid layout for group buttons
- Professional styling with hover effects and shadows
- Clear visual distinction between frontend/backend checks
2025-10-13 04:09:42 -06:00
96fac68c6d Enhance user metadata display with app and outpost information
- Update AuthentikUser interface to include appSlug and outpostName
- Capture x-authentik-meta-app and x-authentik-meta-outpost headers
- Improve UserMetadata component to display connection information
- Filter empty groups from groups array
- Add documentation about available Authentik headers
2025-10-13 03:20:05 -06:00
3f5c4bc820 Fix TypeScript errors in useAuthentik composable
- Add AuthentikUser and AuthStatusResponse interfaces
- Fix toast color from 'gray' to 'neutral' (valid color)
- Remove invalid 'timeout' property from toast.add()
- Fix toast action from 'click' to 'onClick'
- Add proper type annotations for error handling
- Replace process.server with import.meta.server
- Make email, name, uid optional in AuthentikUser interface
2025-10-13 03:05:04 -06:00
87ae5b95e6 Improve PWA offline functionality and fix session caching
- Enable navigateFallback for offline navigation support
- Add JSON files to glob patterns for heroicons support
- Change Authentik API caching from NetworkFirst to NetworkOnly to prevent stale session data
- Add offline detection in checkSessionStatus with proper user feedback
- Add no-cache headers to /api/auth/status endpoint to prevent browser caching
- Show "Modo Offline" toast when user tries to check session while offline
2025-10-13 02:21:50 -06:00
5676647f0f Add login button to 'No Session' toast notifications
Add 'Iniciar Sesión' button to toasts when session is not active.
Clicking the button reloads the page, triggering Authentik redirect
to login flow.

Also increased toast timeout from 5s to 10s to give users more time
to see and click the login button.
2025-10-13 01:52:33 -06:00
00c5657b0a Handle session expiration correctly and fix icon CORS errors
- Detect CORS/redirect errors from Authentik and interpret them as
  "no session" instead of generic error
- When session expires, Authentik returns 302 redirect to login which
  causes CORS error in fetch requests
- Add /api/_nuxt_icon/ to public routes to prevent icon load failures
  after logout

This fixes the issue where logout in Authentik showed "Error" instead
of "Sin Sesión" when checking session status.
2025-10-13 01:49:20 -06:00
f6ba3dff5e Fix session status check to preserve authentication state
Remove /api/auth/status from public routes so it receives Authentik headers.
Remove logic that was clearing local auth state, which caused the page to
show "No autenticado" even when user was authenticated.

Now the button only displays session status without modifying the UI state.
2025-10-13 01:40:49 -06:00
2fc478dd07 Make session status check query Authentik actively
Create real-time session verification against Authentik:
- Add /api/auth/status endpoint that reads Authentik headers live
- Modify checkSessionStatus() to fetch from API instead of local state
- Show "Verifying..." toast while checking
- Sync local state with actual Authentik session status
- Handle connection errors gracefully

This ensures the status check reflects the current Authentik session,
not just the cached local state.
2025-10-13 01:27:51 -06:00
b7285316cf Add session status check button
Add new button to check and display current session status:
- New checkSessionStatus() function in useAuthentik composable
- Displays toast notification with session info
- Shows user name if authenticated or warning if not
- Add UNotifications component to app.vue to render toasts

This allows users to quickly verify their authentication status.
2025-10-13 01:20:45 -06:00
98c674924b Fix logout to invalidate complete Authentik session
- Change logout endpoint from proxy-only to full invalidation
- Use /flows/-/default/invalidation/ endpoint
- Add NUXT_PUBLIC_AUTHENTIK_URL to runtime config
- Logout now closes session in all applications
- Prevents automatic re-authentication after logout
2025-10-12 23:19:46 -06:00
a0a31e8dce Fix: Move composables and components into app/ directory
- Resolve SSR error "useAuthentik is not defined"
- Follow Nuxt 4 directory structure conventions
- When app/ exists, all app directories must be inside it
- This enables proper auto-import of composables
2025-10-12 23:08:55 -06:00