Post compact replies list

This commit is contained in:
2025-11-08 12:47:26 +08:00
parent 749823aefa
commit 1724044bce
3 changed files with 124 additions and 9 deletions

View File

@@ -25,13 +25,17 @@
:max-height="640"
/>
<div
<v-lazy
v-if="props.item.repliesCount"
class="flex gap-2 text-xs opacity-80"
:options="{ threshold: 0.5 }"
transition="fade-transition"
>
<v-icon icon="mdi-comment-text-multiple" size="small" />
<p>{{ props.item.repliesCount }} replies</p>
</div>
<replies-compact-list
:params="{ postId: props.item.id }"
:hide-quick-reply="true"
@react="handleReplyReaction"
/>
</v-lazy>
<div
v-if="props.item.isTruncated"
class="flex gap-2 text-xs opacity-80"
@@ -77,6 +81,10 @@ function handleReaction(symbol: string, attitude: number, delta: number) {
emit("react", symbol, attitude, delta)
}
function handleReplyReaction(postId: string, symbol: string, attitude: number, delta: number) {
emit("react", symbol, attitude, delta)
}
watch(
() => props.item, // Watch the item prop directly
(value) => {