Files
analiticaNucleo/nuxt4-app/app/app.vue
josedario87 1df10db4a0
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 49s
Refactor: Adaptar componentes base al sistema de temas
Cambios:
- app.vue: Reemplazar #fef9f0 con var(--brand-text)
- layouts/dashboard.vue: Usar var(--brand-text)
- layouts/informe.vue: Usar var(--brand-text)

Todos los componentes base ahora responden al sistema de temas.
2025-10-30 17:35:30 -06:00

38 lines
863 B
Vue

<template>
<UApp>
<div class="brand-shell text-[var(--brand-text)]">
<NuxtRouteAnnouncer />
<NuxtLayout>
<NuxtPage />
</NuxtLayout>
</div>
</UApp>
</template>
<script setup lang="ts">
// Inicializar sistema de temas
const { loadTheme, initStorageListener, cleanupStorageListener } = useTheme()
// Signal that the app is ready
onMounted(() => {
// Cargar tema guardado (o aplicar el por defecto)
loadTheme()
// Inicializar sincronización de tema entre pestañas
initStorageListener()
// Add class to HTML element to hide loading screen
if (process.client) {
// Small delay to ensure everything is painted
setTimeout(() => {
document.documentElement.classList.add('nuxt-ready')
}, 100)
}
})
// Limpiar listeners al desmontar
onBeforeUnmount(() => {
cleanupStorageListener()
})
</script>