diff --git a/src/components/AccountManager.tsx b/src/components/AccountManager.tsx index 595efc4..7399fdf 100644 --- a/src/components/AccountManager.tsx +++ b/src/components/AccountManager.tsx @@ -87,7 +87,7 @@ function AccountCard({ {isActive && ( )} -
+
{displayName}
{getAccountTypeBadge(account)}
diff --git a/src/components/nostr/user-menu.tsx b/src/components/nostr/user-menu.tsx index 6f045be..a41390b 100644 --- a/src/components/nostr/user-menu.tsx +++ b/src/components/nostr/user-menu.tsx @@ -6,6 +6,7 @@ import { getDisplayName } from "@/lib/nostr-utils"; import { useGrimoire } from "@/core/state"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; +import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"; import { DropdownMenu, DropdownMenuContent, @@ -23,6 +24,21 @@ import { useState } from "react"; import type { IAccount } from "applesauce-accounts"; import type { ISigner } from "applesauce-signers"; +function UserAvatar({ pubkey }: { pubkey: string }) { + const profile = useProfile(pubkey); + return ( + + + + {getDisplayName(pubkey, profile).slice(0, 2).toUpperCase()} + + + ); +} + function getAccountTypeBadge(account: IAccount) { const accountType = (account.constructor as unknown as { type: string }).type; @@ -116,7 +132,11 @@ export default function UserMenu() { variant="link" aria-label={account ? "User menu" : "Log in"} > - + {account ? ( + + ) : ( + + )}