diff --git a/src/modules/nostr-feed/LINK_AGGREGATOR_PLAN.md b/src/modules/nostr-feed/LINK_AGGREGATOR_PLAN.md index 6bdf31e..9f91aff 100644 --- a/src/modules/nostr-feed/LINK_AGGREGATOR_PLAN.md +++ b/src/modules/nostr-feed/LINK_AGGREGATOR_PLAN.md @@ -78,30 +78,38 @@ 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 -- [ ] Create `SubmitComposer.vue` - Multi-type composer -- [ ] Add link preview on URL paste -- [ ] Integrate with pictrs for media upload -- [ ] Add NSFW toggle +- [x] Create `SubmitComposer.vue` - Multi-type composer +- [x] Add link preview on URL paste +- [x] Add NSFW toggle +- [x] Add route `/submit` for composer +- [ ] Integrate with pictrs for media upload (Future) ### 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 +- [x] Add comment sorting (best, new, old, controversial) +- [x] Integrate comment submission via SubmissionService.createComment() ### Phase 5: Communities (Future) - [ ] Create `CommunityService.ts` diff --git a/src/modules/nostr-feed/components/SortTabs.vue b/src/modules/nostr-feed/components/SortTabs.vue index ff9bb3c..e825b4b 100644 --- a/src/modules/nostr-feed/components/SortTabs.vue +++ b/src/modules/nostr-feed/components/SortTabs.vue @@ -6,6 +6,13 @@ import { computed } from 'vue' import { Flame, Clock, TrendingUp, Swords } from 'lucide-vue-next' +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue +} from '@/components/ui/select' import type { SortType, TimeRange } from '../types/submission' interface Props { @@ -78,19 +85,23 @@ function selectTimeRange(range: TimeRange) { diff --git a/src/modules/nostr-feed/components/SubmissionComment.vue b/src/modules/nostr-feed/components/SubmissionComment.vue new file mode 100644 index 0000000..9a5f6d4 --- /dev/null +++ b/src/modules/nostr-feed/components/SubmissionComment.vue @@ -0,0 +1,276 @@ + + +