From 76ad9c2a0497f76fb7a134af9ad15b0ca427b7da Mon Sep 17 00:00:00 2001 From: limina1 Date: Fri, 7 Nov 2025 11:24:38 -0500 Subject: [PATCH] Fix View details to open modal with JSON and event page button MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update comment action menu to match expected behavior: - "View details" now opens modal showing full event JSON - Modal includes "View on Event Page" button at top for navigation - Simplified modal to only show JSON (removed individual field displays) - Removed separate "View JSON" menu item (consolidated into View details) Technical changes: - Consolidated jsonModalOpen and detailsModalOpen into single state - All action menus (root, replies, nested) now use consistent modal - Button navigates to /events?id={nevent} for full event view - Increased JSON preview max-height to 500px for better visibility 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../publications/SectionComments.svelte | 99 ++++--------------- 1 file changed, 20 insertions(+), 79 deletions(-) diff --git a/src/lib/components/publications/SectionComments.svelte b/src/lib/components/publications/SectionComments.svelte index d89484b..af2e985 100644 --- a/src/lib/components/publications/SectionComments.svelte +++ b/src/lib/components/publications/SectionComments.svelte @@ -25,7 +25,7 @@ // State management let profiles = $state(new Map()); let expandedThreads = $state(new Set()); - let jsonModalOpen = $state(null); + let detailsModalOpen = $state(null); let deletingComments = $state(new Set()); let replyingTo = $state(null); let replyContent = $state(""); @@ -414,24 +414,13 @@ -
  • - -
  • -
  • - -
  • -
  • - -
  • -
  • - -
  • -

    Raw Event JSON

    -
    {JSON.stringify({
    +          
    {JSON.stringify({
                 id: comment.id,
                 pubkey: comment.pubkey,
                 created_at: comment.created_at,