From 6f3314c4db29e5b267b34d2502fbd41603bf4681 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 14 Jan 2026 09:39:19 +0000 Subject: [PATCH] refactor: Update domain to grimoire.rocks and prioritize premium styling Changes: - Update all references from grimoire.app to grimoire.rocks - Make premium gradient styling highest priority (even above active account) - New visual hierarchy: premium (gradient) > active account (orange) > standard (accent) This ensures premium grimoire.rocks users always stand out with the gradient, even when viewing their own profile. --- src/components/nostr/UserName.tsx | 16 ++++++++-------- src/components/nostr/nip05.tsx | 2 +- src/lib/nip05-grimoire.ts | 14 +++++++------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/components/nostr/UserName.tsx b/src/components/nostr/UserName.tsx index fa03494..36b4e96 100644 --- a/src/components/nostr/UserName.tsx +++ b/src/components/nostr/UserName.tsx @@ -14,20 +14,20 @@ 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 gradient styling for grimoire.rocks premium users (highest priority) * Uses orange-400 color for the logged-in user - * Uses gradient styling for grimoire.app premium users */ export function UserName({ pubkey, isMention, className }: UserNameProps) { const { addWindow, state } = useGrimoire(); const profile = useProfile(pubkey); const displayName = getDisplayName(pubkey, profile); + // Check if this is a grimoire.rocks premium user (highest priority) + const isPremium = isGrimoirePremium(pubkey); + // Check if this is the logged-in user const isActiveAccount = state.activeAccount?.pubkey === pubkey; - // Check if this is a grimoire.app premium user - const isPremium = isGrimoirePremium(pubkey); - const handleClick = (e: React.MouseEvent) => { e.stopPropagation(); addWindow("profile", { pubkey }); @@ -38,10 +38,10 @@ export function UserName({ pubkey, isMention, className }: UserNameProps) { dir="auto" className={cn( "font-semibold cursor-crosshair hover:underline hover:decoration-dotted", - isActiveAccount - ? "text-orange-400" - : isPremium - ? "text-grimoire-gradient" + isPremium + ? "text-grimoire-gradient" + : isActiveAccount + ? "text-orange-400" : "text-accent", className, )} diff --git a/src/components/nostr/nip05.tsx b/src/components/nostr/nip05.tsx index ad5c106..6aa0d50 100644 --- a/src/components/nostr/nip05.tsx +++ b/src/components/nostr/nip05.tsx @@ -16,7 +16,7 @@ export function QueryNip05({ // Only show if verified if (nip05pubkey !== pubkey) return null; - // Check if this is a grimoire.app premium user (by pubkey or NIP-05) + // Check if this is a grimoire.rocks premium user (by pubkey or NIP-05) const isPremium = isGrimoirePremium(pubkey) || isGrimoireNip05(nip05); const displayNip05 = nip05.replace(/^_@/, ""); diff --git a/src/lib/nip05-grimoire.ts b/src/lib/nip05-grimoire.ts index dfa62a0..6e1566b 100644 --- a/src/lib/nip05-grimoire.ts +++ b/src/lib/nip05-grimoire.ts @@ -1,7 +1,7 @@ import { nip19 } from "nostr-tools"; /** - * Hardcoded test pubkey for grimoire.app premium treatment + * Hardcoded test pubkey for grimoire.rocks premium treatment * npub107jk7htfv243u0x5ynn43scq9wrxtaasmrwwa8lfu2ydwag6cx2quqncxg */ const PREMIUM_TEST_PUBKEY = (() => { @@ -16,7 +16,7 @@ const PREMIUM_TEST_PUBKEY = (() => { })(); /** - * Check if a pubkey should receive grimoire.app premium visual treatment + * Check if a pubkey should receive grimoire.rocks premium visual treatment * Currently hardcoded for testing, will be replaced with NIP-05 check */ export function isGrimoirePremium(pubkey: string): boolean { @@ -24,17 +24,17 @@ export function isGrimoirePremium(pubkey: string): boolean { } /** - * Check if a NIP-05 identifier is a grimoire.app address - * Future: Will check for @grimoire.app suffix + * Check if a NIP-05 identifier is a grimoire.rocks address + * Future: Will check for @grimoire.rocks suffix */ export function isGrimoireNip05(nip05?: string): boolean { if (!nip05) return false; - return nip05.endsWith("@grimoire.app"); + return nip05.endsWith("@grimoire.rocks"); } /** - * Extract username from grimoire.app NIP-05 - * Returns null if not a grimoire.app address + * Extract username from grimoire.rocks NIP-05 + * Returns null if not a grimoire.rocks address */ export function getGrimoireUsername(nip05: string): string | null { if (!isGrimoireNip05(nip05)) return null;