feat: add separate gradients for Grimoire members based on login state

Updates the UserName component to display different gradient colors for
Grimoire members depending on whether they are the logged-in user:
- Orange-yellow gradient for logged-in Grimoire members (current user)
- Purple-blue gradient for other Grimoire members (not logged in)

This visual distinction makes it easier to identify your own username
versus other Grimoire members in feeds and conversations.
This commit is contained in:
Claude
2026-01-18 17:48:20 +00:00
parent 1756715e30
commit ad8a6e6811

View File

@@ -15,7 +15,9 @@ interface UserNameProps {
* Shows placeholder derived from pubkey while loading or if no profile exists
* Clicking opens the user's profile
* Uses highlight color for the logged-in user (themeable amber)
* Shows Grimoire members with yellow-orange gradient styling
* Shows Grimoire members with gradient styling:
* - Orange-yellow gradient for logged-in Grimoire member
* - Purple-blue gradient for other Grimoire members
*/
export function UserName({ pubkey, isMention, className }: UserNameProps) {
const { addWindow, state } = useGrimoire();
@@ -37,7 +39,9 @@ export function UserName({ pubkey, isMention, className }: UserNameProps) {
className={cn(
"font-semibold cursor-crosshair hover:underline hover:decoration-dotted",
isGrimoire
? "bg-gradient-to-br from-yellow-500 via-orange-500 to-orange-600 bg-clip-text text-transparent"
? isActiveAccount
? "bg-gradient-to-br from-yellow-500 via-orange-500 to-orange-600 bg-clip-text text-transparent"
: "bg-gradient-to-br from-purple-500 via-purple-600 to-cyan-500 bg-clip-text text-transparent"
: isActiveAccount
? "text-highlight"
: "text-accent",