Alejandro 7241b3fb5a feat: add copy button for NIP markdown (#26)
* feat: add copy button for NIP markdown

- Add copy button to WindowToolbar for regular NIPs (appId: "nip")
  - Button appears in window toolbar next to edit button
  - Uses Copy/CopyCheck icons from lucide-react
  - Fetches NIP content via useNip hook
  - Shows toast notification on successful copy

- Add copy button to CommunityNIPDetailRenderer for community NIPs (kind 30817)
  - Button appears in header next to title
  - Copies event.content (markdown) to clipboard
  - Uses same Copy/CopyCheck icon pattern
  - Shows toast notification on successful copy

Both implementations use the existing useCopy hook for state management
and maintain consistent styling with other toolbar buttons.

* refactor: use Button component and remove misleading shortcuts

- Replace native button elements with Button component from shadcn/ui
  - Use variant="ghost" and size="icon" for consistent styling
  - Apply h-8 w-8 classes for uniform button sizing
  - Remove manual className styling in favor of component variants

- Remove misleading keyboard shortcut hints from button titles
  - Changed "Edit command (Cmd+E)" to "Edit command"
  - Changed "Close window (Cmd+W)" to "Close window"
  - These shortcuts don't actually work, so they were misleading

- Clean up imports and formatting
  - Format lucide-react imports across multiple lines
  - Add Button component import
  - Run prettier for consistent code style

* refactor: use link variant and remove size class overrides

- Change all Button components from variant="ghost" to variant="link"
- Remove className="h-8 w-8" overrides to use default Button sizing
- Maintains size="icon" for proper icon button behavior
- Applies to WindowToolbar and CommunityNIPDetailRenderer

* style: add muted color to window toolbar icon buttons

- Add className="text-muted-foreground" to all Button components in WindowToolbar
- Improves visual contrast for toolbar buttons
- Applies to Edit, Copy NIP, More actions, and Close window buttons

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-23 00:00:52 +01:00
2025-12-18 15:46:02 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-19 12:49:29 +01:00
2025-12-13 15:06:05 +01:00
2025-12-10 13:00:39 +01:00
2025-12-22 20:40:16 +00:00
2025-12-22 20:40:16 +00:00
👶
2025-12-09 16:26:31 +01:00
2025-12-20 14:25:40 +01:00
2025-12-15 22:19:28 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
👶
2025-12-09 16:26:31 +01:00
2025-12-21 22:39:07 +01:00
2025-12-14 16:50:16 +01:00
Description
No description provided
MIT 14 MiB
Languages
TypeScript 98.9%
CSS 0.8%
JavaScript 0.3%