fix(ui): group profile label inside menu

This commit is contained in:
2026-09-28 14:26:48 +08:00
parent ea4a54f5c6
commit 2982d560ce
+21 -19
View File
@@ -77,26 +77,28 @@ export function NavUser({ user }: { user: NavUserData }) {
align="end"
sideOffset={4}
>
<DropdownMenuLabel className="p-0 font-normal">
<div className="flex items-center gap-2.5 px-1 py-1.5 text-left text-xs">
<Avatar size="sm" className="rounded-lg">
{user.avatar ? (
<AvatarImage src={user.avatar} alt={user.name} />
) : null}
<AvatarFallback className="rounded-lg text-xs font-medium">
{initials}
</AvatarFallback>
</Avatar>
<div className="grid flex-1 text-left text-xs leading-tight">
<span className="truncate font-semibold text-foreground">
{user.name}
</span>
<span className="truncate text-[11px] text-muted-foreground">
{user.email}
</span>
<DropdownMenuGroup>
<DropdownMenuLabel className="p-0 font-normal">
<div className="flex items-center gap-2.5 px-1 py-1.5 text-left text-xs">
<Avatar size="sm" className="rounded-lg">
{user.avatar ? (
<AvatarImage src={user.avatar} alt={user.name} />
) : null}
<AvatarFallback className="rounded-lg text-xs font-medium">
{initials}
</AvatarFallback>
</Avatar>
<div className="grid flex-1 text-left text-xs leading-tight">
<span className="truncate font-semibold text-foreground">
{user.name}
</span>
<span className="truncate text-[11px] text-muted-foreground">
{user.email}
</span>
</div>
</div>
</div>
</DropdownMenuLabel>
</DropdownMenuLabel>
</DropdownMenuGroup>
<DropdownMenuSeparator />