This commit is contained in:
parent
561f1d57e0
commit
4ee54e03ca
|
|
@ -46,25 +46,22 @@ export function UserMenu({ user }: { user: UserData }) {
|
|||
<Button variant="ghost" className="px-2">
|
||||
{user?.image ? (
|
||||
<Image
|
||||
className="h-6 w-6 select-none rounded-full ring-1 ring-zinc-100/10 transition-opacity duration-300 hover:opacity-80"
|
||||
className="h-12 w-12 select-none rounded-full ring-1 ring-zinc-100/10 transition-opacity duration-300 hover:opacity-80"
|
||||
src={`${user.image}&s=60`}
|
||||
alt='User profile image'
|
||||
width={24}
|
||||
height={24}
|
||||
width={48}
|
||||
height={48}
|
||||
/>
|
||||
) : (
|
||||
<div className="flex h-7 w-7 shrink-0 select-none items-center justify-center rounded-full bg-muted/50 text-xs font-medium uppercase text-muted-foreground">
|
||||
<div className="flex h-12 w-12 shrink-0 select-none items-center justify-center rounded-full bg-muted/50 text-xs font-medium uppercase text-muted-foreground">
|
||||
{user?.user_name ? getUserInitials(user?.user_name.slice(0, 2)) : null}
|
||||
</div>
|
||||
)}
|
||||
<span className="ml-2 hidden lg:flex">{user?.user_name && getUserInitials(user?.user_name)}</span>
|
||||
<span className="hidden">{user?.user_name && getUserInitials(user?.user_name)}</span>
|
||||
{/* <span className="ml-2 hidden lg:flex">{user?.user_name && getUserInitials(user?.user_name)}</span> */}
|
||||
</Button>
|
||||
</DropdownMenuTrigger>
|
||||
<DropdownMenuContent sideOffset={8} align="start" className="w-[180px]">
|
||||
{/* <DropdownMenuItem className="flex-col items-start">
|
||||
<div className="text-xs font-medium">{user?.user_name}</div>
|
||||
<div className="text-xs text-zinc-500">{user?.user_name}</div>
|
||||
</DropdownMenuItem> */}
|
||||
|
||||
{/* 新增 "Profile" 选项 */}
|
||||
<DropdownMenuItem
|
||||
|
|
@ -117,6 +114,7 @@ export function UserMenu({ user }: { user: UserData }) {
|
|||
>
|
||||
Log Out
|
||||
</DropdownMenuItem>
|
||||
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue