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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user