From 1f45e35ab52496d6240a84ce7b29e6228f81ded5 Mon Sep 17 00:00:00 2001 From: Thomas Peterson Date: Thu, 4 Jun 2026 19:19:59 +0200 Subject: [PATCH] UI: helle Seitenleiste statt schwarz + aufgewertete Topbar MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Look & Feel an die Referenz angepasst: weiße Navigation mit Orange-Akzent (aktives Item orange-soft, Chevrons, graue Icons) statt dunkler Sidebar. Topbar mit Nutzer-Block (Avatar-Initialen, Name, Rolle, Firma). Navi bleibt flach (keine Gruppen-Einteilung). name im CurrentUser-Typ ergänzt. Co-Authored-By: Claude Opus 4.8 --- frontend/src/layouts/DashboardLayout.vue | 66 ++++++++++++++++++------ frontend/src/stores/auth.ts | 1 + 2 files changed, 52 insertions(+), 15 deletions(-) diff --git a/frontend/src/layouts/DashboardLayout.vue b/frontend/src/layouts/DashboardLayout.vue index 6e1464b..c4addfe 100644 --- a/frontend/src/layouts/DashboardLayout.vue +++ b/frontend/src/layouts/DashboardLayout.vue @@ -26,6 +26,16 @@ const nav = computed(() => [ const contextLabel = computed(() => auth.user?.company?.name ?? auth.user?.reseller?.name ?? 'Plattform', ) +const userName = computed(() => auth.user?.name || auth.user?.email || '') +const initials = computed(() => + userName.value.split(/[\s@.]+/).filter(Boolean).slice(0, 2).map((s) => s[0]).join('').toUpperCase() || 'U', +) +const roleLabel = computed(() => { + if (auth.isPlatformAdmin) return 'Plattform-Admin' + if (auth.isResellerAdmin) return 'Reseller-Admin' + if (auth.isCompanyAdmin) return 'Firmen-Admin' + return 'Mitarbeiter' +}) function logout() { auth.logout() @@ -42,14 +52,18 @@ async function stopImpersonation() {
@@ -65,7 +79,13 @@ async function stopImpersonation() { {{ contextLabel }}
- {{ auth.user?.email }} +
+
{{ initials }}
+
+ {{ userName }} + {{ roleLabel }} +
+
@@ -77,30 +97,46 @@ async function stopImpersonation() { diff --git a/frontend/src/stores/auth.ts b/frontend/src/stores/auth.ts index 55d52f3..6cfd0f2 100644 --- a/frontend/src/stores/auth.ts +++ b/frontend/src/stores/auth.ts @@ -10,6 +10,7 @@ export interface TenantRef { export interface CurrentUser { id: string email: string + name?: string roles: string[] reseller: TenantRef | null company: TenantRef | null