frontend 2026-06-10 bontva a 2 felület

This commit is contained in:
Roo
2026-06-10 08:06:07 +00:00
parent b84b1bab41
commit 90e3173fbc
59 changed files with 8616 additions and 1412 deletions

View File

@@ -0,0 +1,48 @@
<template>
<div class="private-layout min-h-screen text-white">
<!-- Modular header with BaseHeader + Lego components -->
<BaseHeader>
<template #left>
<HeaderLogo />
</template>
<template #center>
<!-- Center label: {firstName}_garage -->
<span class="text-sm font-semibold text-white/70 tracking-wide">
{{ centerLabel }}
</span>
</template>
<template #right>
<HeaderCompanySwitcher />
<HeaderProfile />
</template>
</BaseHeader>
<!-- Main content slot for child routes -->
<main class="relative z-10">
<router-view />
</main>
</div>
</template>
<script setup lang="ts">
import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import { useAuthStore } from '../stores/auth'
import BaseHeader from '../components/layout/BaseHeader.vue'
import HeaderLogo from '../components/header/HeaderLogo.vue'
import HeaderCompanySwitcher from '../components/header/HeaderCompanySwitcher.vue'
import HeaderProfile from '../components/header/HeaderProfile.vue'
const { t } = useI18n()
const authStore = useAuthStore()
// ── Center label: shows "{firstName}_garage" ───────────────────────
const centerLabel = computed(() => {
const firstName = authStore.user?.first_name ||
authStore.user?.email?.split('@')[0] ||
t('header.user')
return t('header.personalGarageLabel', { name: firstName })
})
</script>