Files
archie/ui/src/components/topbar/ProfileDropdown.vue
T
sam 2bddb9f36a feat(webui): grouped topbar navigation, built from components
Five top-level items instead of eleven flat ones: Dashboard as a link, then
Work, Agent, Events and System as dropdowns, with each item's one-line
description on a hover tooltip. Configuration dissolves into /system/{status,
appearance,tasks,models,repos,advanced} and /settings redirects to the first of
them, so existing bookmarks still land somewhere. Logs gets a nav entry for the
first time.

The bar is composed from named components rather than one file: Brand (Logo,
BrandName), Nav (NavTrigger, NavGroup, NavItem), SearchBar, SupportLink,
ThemeToggle, ProfileDropdown. The nav model reads the route table, so a route
and its nav entry cannot disagree, and a group whose every child is gated off
is dropped while a group left with one child stays a dropdown.

The Go page registry moves with it, which its parse-the-route-table test
enforces.
2026-09-20 18:46:11 +10:00

37 lines
1.1 KiB
Vue

<script setup lang="ts">
import { Avatar, AvatarFallback } from "@/components/ui/avatar";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
</script>
<template>
<DropdownMenu>
<DropdownMenuTrigger
class="focus-visible:ring-ring/50 rounded-full outline-none focus-visible:ring-[3px]"
aria-label="Operator menu"
>
<Avatar class="size-7">
<AvatarFallback class="text-xs">A</AvatarFallback>
</Avatar>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" class="w-48">
<DropdownMenuLabel class="text-muted-foreground text-xs font-normal">
Signed in locally
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuItem as-child>
<RouterLink to="/system/appearance" class="w-full cursor-pointer">Appearance</RouterLink>
</DropdownMenuItem>
<DropdownMenuItem as-child>
<RouterLink to="/system/status" class="w-full cursor-pointer">Status</RouterLink>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</template>