From 2d0aadccb7bd589ae0182f118cadf976dc603d5f Mon Sep 17 00:00:00 2001 From: padreug Date: Tue, 16 Sep 2025 23:08:10 +0200 Subject: [PATCH] Implement Note Composer and enhance NostrFeed interactions - Added NoteComposer.vue for composing notes, including reply functionality and mention support. - Integrated NoteComposer into Home.vue, allowing users to publish notes and reply to existing ones. - Enhanced NostrFeed.vue to handle reply events, improving user engagement with notes. - Updated Home.vue to manage note publishing and reply states effectively. These changes enhance the user experience by providing a seamless way to compose and interact with notes within the feed. Enhance NostrFeed and Home components for improved user experience - Added compact mode support in NostrFeed.vue to optimize display for mobile users. - Refactored layout in NostrFeed.vue for better responsiveness and usability, including adjustments to padding and spacing. - Updated Home.vue to integrate a collapsible filter panel and a floating action button for composing notes, enhancing accessibility and interaction. - Implemented quick filter presets for mobile, allowing users to easily switch between content types. These changes improve the overall functionality and user engagement within the feed, providing a more streamlined experience across devices. Enhance NoteComposer and Home components for improved note management - Updated NoteComposer.vue to include a close button for better user control when composing notes. - Modified Home.vue to handle the close event from NoteComposer, allowing users to dismiss the composer easily. These changes enhance the user experience by providing a more intuitive interface for composing and managing notes. --- .../nostr-feed/components/NostrFeed.vue | 254 +++++++------ .../nostr-feed/components/NoteComposer.vue | 337 ++++++++++++++++++ src/pages/Home.vue | 171 +++++++-- 3 files changed, 634 insertions(+), 128 deletions(-) create mode 100644 src/modules/nostr-feed/components/NoteComposer.vue diff --git a/src/modules/nostr-feed/components/NostrFeed.vue b/src/modules/nostr-feed/components/NostrFeed.vue index 5472ffe..fa8c2f9 100644 --- a/src/modules/nostr-feed/components/NostrFeed.vue +++ b/src/modules/nostr-feed/components/NostrFeed.vue @@ -1,24 +1,29 @@ + + +
+ +
+ + Admin + + + Reply + + + {{ getMarketEventType({ kind: note.kind }) }} + + + {{ formatDistanceToNow(note.created_at * 1000, { addSuffix: true }) }} +
@@ -240,22 +254,54 @@ function onShareProduct(productId: string) { {{ note.content }}
- -
-
- Mentions: - - {{ mention.slice(0, 8) }}... - - - +{{ note.mentions.length - 3 }} more - + +
+
+ +
+ Mentions: + + {{ mention.slice(0, 6) }}... + + + +{{ note.mentions.length - 2 }} more + +
+ + +
+ + + +
- - - + + + diff --git a/src/modules/nostr-feed/components/NoteComposer.vue b/src/modules/nostr-feed/components/NoteComposer.vue new file mode 100644 index 0000000..7a90b95 --- /dev/null +++ b/src/modules/nostr-feed/components/NoteComposer.vue @@ -0,0 +1,337 @@ +