feat(operator): avatar dropdown context menu in topbar

New UserMenu component owns its own trigger + dropdown + dismissal so the
topbar stays simple. Menu contents: identity row (name + email), theme
toggle (reuses useTweaks so the floating panel and menu stay in sync),
link to /settings, Sign out (calls useOidcAuth().logout).

Dismissal: outside click via a transparent Teleport scrim, Escape, and
route change (watch on route.path → close).

Drops the now-unused useOidcAuth import from OpTopbar.
This commit is contained in:
Ronni Baslund
2026-05-24 16:45:11 +02:00
parent 885aa65219
commit 3f4be27bd9
2 changed files with 164 additions and 2 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
<script setup lang="ts">
withDefaults(defineProps<{ oncall?: boolean }>(), { oncall: true })
const { user } = useOidcAuth()
const { state: tweaks } = useTweaks()
const { open: openPalette } = useCommandPalette()
@@ -39,7 +38,7 @@ const env = computed(() => tweaks.value.env)
<span class="icon-btn-dot" />
</button>
<Avatar :name="user?.userInfo?.name || user?.userName || '?'" :size="26" />
<UserMenu />
</header>
</template>