Implemented comment viewing and posting

This commit is contained in:
2026-03-01 12:52:22 -05:00
parent 5cdbf72328
commit 5483e42bb4
9 changed files with 203 additions and 18 deletions

View File

@@ -6,6 +6,7 @@
import { getModRequest } from '@/api/modRequests';
import Button from '@/components/ui/button/Button.vue';
import Badge from '@/components/ui/badge/Badge.vue';
import CommentThread from '../discussion/CommentThread.vue';
const route = useRoute();
const router = useRouter();
@@ -41,7 +42,7 @@
<div class="max-w-[80rem] mt-5 mx-auto px-2 lg:px-20 w-full">
<div class="mb-8 flex items-center justify-between">
<div>
<h1 class="scroll-m-20 text-3xl font-semibold tracking-tight mb-2">Mod Request: {{ post.title }}</h1>
<h1 class="scroll-m-20 text-3xl font-semibold tracking-tight mb-2">Mod Request: {{ post?.title }}</h1>
<p class="text-muted-foreground" v-if="post">
Requested by {{ post.poster_name || 'Unknown' }} on {{ new
Date(post.created_at).toLocaleDateString() }}
@@ -95,10 +96,8 @@
</div>
<!-- discussion placeholder -->
<div class="mt-10">
<h3 class="text-xl font-semibold">Discussion</h3>
<p class="text-muted-foreground">Comments and thread will appear here once implemented.</p>
</div>
<CommentThread :parent-id="post.id" :comments="post.comments" />
</div>
<div v-else>
<p class="text-muted-foreground">Unable to locate this mod request.</p>