Files
Browser/desktop-client-v2.0/src/components/profile-dropdown.tsx
T
2026-06-25 14:58:52 +08:00

39 lines
1.3 KiB
TypeScript

import { Link } from '@tanstack/react-router'
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from '@/components/ui/dropdown-menu'
import { Button } from '@/components/ui/button'
export function ProfileDropdown() {
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button variant='ghost' className='relative h-8 w-8 rounded-full'>
<Avatar className='h-8 w-8'>
<AvatarImage src='/avatars/01.png' alt='Browser Desk' />
<AvatarFallback>BD</AvatarFallback>
</Avatar>
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent className='w-56' align='end'>
<DropdownMenuLabel>
<div className='flex flex-col gap-1'>
<span className='text-sm font-medium'>Browser Desk</span>
<span className='text-xs text-muted-foreground'>用户前台</span>
</div>
</DropdownMenuLabel>
<DropdownMenuSeparator />
<DropdownMenuItem asChild>
<Link to='/settings'>系统设置</Link>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)
}