siteHeader title dinámico segun activeTab
This commit is contained in:
@@ -22,6 +22,23 @@ import {
|
||||
} from "@/components/ui/dropdown-menu"
|
||||
|
||||
const { t, locale } = useI18n()
|
||||
|
||||
const props = defineProps<{
|
||||
activeTab?: string
|
||||
}>()
|
||||
|
||||
const tabLabels: Record<string, string> = {
|
||||
dashboard: 'Tablero',
|
||||
projects: 'Proyectos',
|
||||
lifecycle: 'Ciclo de Vida',
|
||||
analytics: 'Analíticas',
|
||||
team: 'Equipo',
|
||||
documents: 'Documentos',
|
||||
'data-library': 'Biblioteca de Datos',
|
||||
reports: 'Reportes',
|
||||
'word-assistant': 'Asistente Word',
|
||||
templates: 'Plantillas',
|
||||
}
|
||||
const searchOpen = ref(false)
|
||||
const searchQuery = ref("")
|
||||
const { results, loading, search, clearResults } = useSearch()
|
||||
@@ -85,7 +102,7 @@ const groupedResults = computed(() => {
|
||||
class="mx-2 data-[orientation=vertical]:h-4"
|
||||
/>
|
||||
<h1 class="text-base font-medium">
|
||||
{{ t('siteHeader.title') }}
|
||||
{{ tabLabels[activeTab ?? ''] || t('siteHeader.title') }}
|
||||
</h1>
|
||||
<div class="ml-auto flex items-center gap-2">
|
||||
<Dialog v-model:open="searchOpen">
|
||||
|
||||
@@ -124,7 +124,7 @@ const tabContent: Record<string, { title: string; description: string; cards: {
|
||||
@update:active-tab="activeTab = $event"
|
||||
/>
|
||||
<SidebarInset>
|
||||
<SiteHeader />
|
||||
<SiteHeader :active-tab="activeTab" />
|
||||
<div class="flex flex-1 flex-col">
|
||||
<div class="@container/main flex flex-1 flex-col gap-2">
|
||||
<div class="flex flex-col gap-4 py-4 md:gap-6 md:py-6">
|
||||
|
||||
Reference in New Issue
Block a user