diff --git a/src/components/WindowToolbar.tsx b/src/components/WindowToolbar.tsx index 43779b4..3a75d9f 100644 --- a/src/components/WindowToolbar.tsx +++ b/src/components/WindowToolbar.tsx @@ -1,4 +1,11 @@ -import { X, Pencil, MoreVertical, WandSparkles, Copy, CopyCheck } from "lucide-react"; +import { + X, + Pencil, + MoreVertical, + WandSparkles, + Copy, + CopyCheck, +} from "lucide-react"; import { useSetAtom } from "jotai"; import { useState } from "react"; import { WindowInstance } from "@/types/app"; @@ -10,6 +17,7 @@ import { DropdownMenuItem, DropdownMenuTrigger, } from "@/components/ui/dropdown-menu"; +import { Button } from "@/components/ui/button"; import { SpellDialog } from "@/components/nostr/SpellDialog"; import { reconstructCommand as reconstructReqCommand } from "@/lib/spell-conversion"; import { toast } from "sonner"; @@ -66,7 +74,7 @@ export function WindowToolbar({ // Fetch NIP content for regular NIPs const { content: nipContent } = useNip( - isNipWindow && window?.props?.number ? window.props.number : "" + isNipWindow && window?.props?.number ? window.props.number : "", ); const handleCopyNip = () => { @@ -96,44 +104,46 @@ export function WindowToolbar({ <> {window && ( <> - {/* Edit button with keyboard shortcut hint */} - + {/* Copy button for NIPs */} {isNipWindow && ( - + {copied ? : } + )} {/* More actions menu - only for REQ windows for now */} {isReqWindow && ( - + @@ -159,14 +169,16 @@ export function WindowToolbar({ )} {onClose && ( - + )} ); diff --git a/src/components/nostr/kinds/CommunityNIPDetailRenderer.tsx b/src/components/nostr/kinds/CommunityNIPDetailRenderer.tsx index d82df2d..240fa69 100644 --- a/src/components/nostr/kinds/CommunityNIPDetailRenderer.tsx +++ b/src/components/nostr/kinds/CommunityNIPDetailRenderer.tsx @@ -3,6 +3,7 @@ import { Copy, CopyCheck } from "lucide-react"; import { getTagValue } from "applesauce-core/helpers"; import { UserName } from "../UserName"; import { MarkdownContent } from "../MarkdownContent"; +import { Button } from "@/components/ui/button"; import { useCopy } from "@/hooks/useCopy"; import { toast } from "sonner"; import type { NostrEvent } from "@/types/nostr"; @@ -46,18 +47,15 @@ export function CommunityNIPDetailRenderer({ event }: { event: NostrEvent }) { {/* Title with Copy Button */}

{title}

- + {copied ? : } +
{/* Metadata */}