@@ -13,11 +13,10 @@ function getCommentUrl(comment: Comment): string {
1313}
1414const props = defineProps <{
1515 comment: Comment
16- depth: number
16+ isReply? : boolean
17+ replyingTo? : string
1718}>()
1819
19- const MaxDepth = 4
20-
2120function getFeatureUrl(feature : RichtextFeature ): string | undefined {
2221 if (feature .$type === ' app.bsky.richtext.facet#link' ) return feature .uri
2322 if (feature .$type === ' app.bsky.richtext.facet#mention' )
@@ -41,7 +40,7 @@ function getHostname(uri: string): string {
4140 </script >
4241
4342<template >
44- <div : class =" depth === 0 ? ' flex gap-3' : 'flex gap-3 mt-3' " >
43+ <div class =" flex gap-3" >
4544 <!-- Avatar -->
4645 <a
4746 :href =" `https://bsky.app/profile/${comment.author.handle}`"
@@ -53,7 +52,7 @@ function getHostname(uri: string): string {
5352 v-if =" comment.author.avatar"
5453 :src =" comment.author.avatar"
5554 :alt =" comment.author.displayName || comment.author.handle"
56- :class =" ['rounded-full', depth === 0 ? 'w-10 h-10 ' : 'w-8 h-8 ']"
55+ :class =" ['rounded-full', isReply ? 'w-8 h-8 ' : 'w-10 h-10 ']"
5756 width =" 40"
5857 height =" 40"
5958 loading =" lazy"
@@ -62,14 +61,19 @@ function getHostname(uri: string): string {
6261 v-else
6362 :class =" [
6463 'rounded-full bg-border flex items-center justify-center text-fg-muted',
65- depth === 0 ? 'w-10 h-10 ' : 'w-8 h-8 text-sm ',
64+ isReply ? 'w-8 h-8 text-sm ' : 'w-10 h-10 ',
6665 ]"
6766 >
6867 {{ (comment.author.displayName || comment.author.handle).charAt(0).toUpperCase() }}
6968 </div >
7069 </a >
7170
7271 <div class =" flex-1 min-w-0" >
72+ <!-- Replying to label -->
73+ <div v-if =" replyingTo" class =" text-xs text-fg-subtle mb-0.5" >
74+ {{ $t('blog.atproto.replying_to', { name: replyingTo }) }}
75+ </div >
76+
7377 <!-- Author info + timestamp -->
7478 <div class =" flex flex-wrap items-baseline gap-x-2 gap-y-0" >
7579 <a
@@ -171,33 +175,6 @@ function getHostname(uri: string): string {
171175 {{ $t('blog.atproto.repost_count', { count: comment.repostCount }, comment.repostCount) }}
172176 </span >
173177 </div >
174-
175- <!-- Nested replies -->
176- <template v-if =" comment .replies .length > 0 " >
177- <div v-if =" depth < MaxDepth" class =" mt-2 ps-2 border-is-2 border-border flex flex-col" >
178- <BlueskyComment
179- v-for =" reply in comment.replies"
180- :key =" reply.uri"
181- :comment =" reply"
182- :depth =" depth + 1"
183- />
184- </div >
185- <a
186- v-else
187- :href =" getCommentUrl(comment.replies[0]!)"
188- target =" _blank"
189- rel =" noopener noreferrer"
190- class =" mt-2 block text-sm link"
191- >
192- {{
193- $t(
194- 'blog.atproto.more_replies',
195- { count: comment.replies.length },
196- comment.replies.length,
197- )
198- }}
199- </a >
200- </template >
201178 </div >
202179 </div >
203180</template >
0 commit comments