From 8315a8ee99dee2e39cadafa7d8fcf1a5a2a74700 Mon Sep 17 00:00:00 2001 From: Patrick Mulligan Date: Thu, 1 Jan 2026 19:01:58 +0100 Subject: [PATCH] feat(nostr-feed): Add submission detail view (Phase 4) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add SubmissionDetail.vue for full post view with content display - Add SubmissionComment.vue for recursive threaded comments - Add SubmissionDetailPage.vue route wrapper - Add /submission/:id route to module - Update SubmissionList share URL to use correct route - Update test page to navigate to detail view on click - Update plan document with Phase 4 completion 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../nostr-feed/LINK_AGGREGATOR_PLAN.md | 33 +- .../components/SubmissionComment.vue | 206 ++++++++ .../components/SubmissionDetail.vue | 464 ++++++++++++++++++ .../nostr-feed/components/SubmissionList.vue | 2 +- src/modules/nostr-feed/index.ts | 21 +- .../nostr-feed/views/SubmissionDetailPage.vue | 18 + src/pages/LinkAggregatorTest.vue | 5 +- 7 files changed, 732 insertions(+), 17 deletions(-) create mode 100644 src/modules/nostr-feed/components/SubmissionComment.vue create mode 100644 src/modules/nostr-feed/components/SubmissionDetail.vue create mode 100644 src/modules/nostr-feed/views/SubmissionDetailPage.vue diff --git a/src/modules/nostr-feed/LINK_AGGREGATOR_PLAN.md b/src/modules/nostr-feed/LINK_AGGREGATOR_PLAN.md index 6bdf31e..f6ba525 100644 --- a/src/modules/nostr-feed/LINK_AGGREGATOR_PLAN.md +++ b/src/modules/nostr-feed/LINK_AGGREGATOR_PLAN.md @@ -78,30 +78,37 @@ Transform the nostr-feed module into a Reddit-style link aggregator with support ## Implementation Phases -### Phase 1: Core Data Model (Current) +### Phase 1: Core Data Model - [x] Create feature branch - [x] Document plan -- [ ] Create `types/submission.ts` - Type definitions -- [ ] Create `SubmissionService.ts` - Submission CRUD -- [ ] Create `LinkPreviewService.ts` - OG tag fetching -- [ ] Extend `FeedService.ts` - Handle kind 1111 +- [x] Create `types/submission.ts` - Type definitions +- [x] Create `SubmissionService.ts` - Submission CRUD +- [x] Create `LinkPreviewService.ts` - OG tag fetching +- [x] Extend `FeedService.ts` - Handle kind 1111 -### Phase 2: Post Creation +### Phase 2: Post Creation (Pending) - [ ] Create `SubmitComposer.vue` - Multi-type composer - [ ] Add link preview on URL paste - [ ] Integrate with pictrs for media upload - [ ] Add NSFW toggle ### Phase 3: Feed Display -- [ ] Create `SubmissionCard.vue` - Link aggregator card -- [ ] Create `VoteButtons.vue` - Up/down voting -- [ ] Add feed sorting (hot, new, top, controversial) -- [ ] Add score calculation +- [x] Create `SubmissionRow.vue` - Link aggregator row (Reddit/Lemmy style) +- [x] Create `VoteControls.vue` - Up/down voting +- [x] Create `SortTabs.vue` - Sort tabs (hot, new, top, controversial) +- [x] Create `SubmissionList.vue` - Main feed container +- [x] Create `SubmissionThumbnail.vue` - Thumbnail display +- [x] Add feed sorting (hot, new, top, controversial) +- [x] Add score calculation +- [x] Create `LinkAggregatorTest.vue` - Test page with mock data & live mode ### Phase 4: Detail View -- [ ] Create `SubmissionDetail.vue` - Full post view -- [ ] Integrate `ThreadedPost.vue` for comments -- [ ] Add comment sorting +- [x] Create `SubmissionDetail.vue` - Full post view with content display +- [x] Create `SubmissionComment.vue` - Recursive threaded comments +- [x] Create `SubmissionDetailPage.vue` - Route page wrapper +- [x] Add route `/submission/:id` for detail view +- [ ] Add comment sorting (pending) +- [ ] Integrate comment submission (pending) ### Phase 5: Communities (Future) - [ ] Create `CommunityService.ts` diff --git a/src/modules/nostr-feed/components/SubmissionComment.vue b/src/modules/nostr-feed/components/SubmissionComment.vue new file mode 100644 index 0000000..1dc820f --- /dev/null +++ b/src/modules/nostr-feed/components/SubmissionComment.vue @@ -0,0 +1,206 @@ + + + diff --git a/src/modules/nostr-feed/components/SubmissionDetail.vue b/src/modules/nostr-feed/components/SubmissionDetail.vue new file mode 100644 index 0000000..25a18c4 --- /dev/null +++ b/src/modules/nostr-feed/components/SubmissionDetail.vue @@ -0,0 +1,464 @@ + + +