From 3777366b8721b758409b21324e5b783e558c3b62 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 14 Jan 2026 17:37:32 +0000 Subject: [PATCH] feat: Add highlight theme color for active user display Add dedicated 'highlight' color to theme system for displaying the logged-in user's name, replacing the use of 'zap' color which felt semantically incorrect. The highlight color is optimized for contrast on each theme's background. - Add highlight to ThemeColors interface and apply.ts - Add --highlight CSS variable to index.css (light and dark) - Add highlight to tailwind.config.js - Configure appropriate highlight values for dark, light, and plan9 themes - Update UserName.tsx to use text-highlight for active account - Update SpellRenderer.tsx MePlaceholder to use text-highlight --- src/components/nostr/UserName.tsx | 4 ++-- src/components/nostr/kinds/SpellRenderer.tsx | 2 +- src/index.css | 6 ++++++ src/lib/themes/apply.ts | 5 +++++ src/lib/themes/builtin/dark.ts | 3 +++ src/lib/themes/builtin/light.ts | 3 +++ src/lib/themes/builtin/plan9.ts | 3 +++ src/lib/themes/types.ts | 3 +++ tailwind.config.js | 2 ++ 9 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/components/nostr/UserName.tsx b/src/components/nostr/UserName.tsx index e8a17d9..551e86c 100644 --- a/src/components/nostr/UserName.tsx +++ b/src/components/nostr/UserName.tsx @@ -13,7 +13,7 @@ interface UserNameProps { * Component that displays a user's name from their Nostr profile * Shows placeholder derived from pubkey while loading or if no profile exists * Clicking opens the user's profile - * Uses zap color for the logged-in user (themeable gold/amber) + * Uses highlight color for the logged-in user (themeable amber) */ export function UserName({ pubkey, isMention, className }: UserNameProps) { const { addWindow, state } = useGrimoire(); @@ -33,7 +33,7 @@ export function UserName({ pubkey, isMention, className }: UserNameProps) { dir="auto" className={cn( "font-semibold cursor-crosshair hover:underline hover:decoration-dotted", - isActiveAccount ? "text-zap" : "text-accent", + isActiveAccount ? "text-highlight" : "text-accent", className, )} onClick={handleClick} diff --git a/src/components/nostr/kinds/SpellRenderer.tsx b/src/components/nostr/kinds/SpellRenderer.tsx index 35e8263..0002046 100644 --- a/src/components/nostr/kinds/SpellRenderer.tsx +++ b/src/components/nostr/kinds/SpellRenderer.tsx @@ -42,7 +42,7 @@ export function MePlaceholder({ return (