feat: add support for distinguished comments
This commit is contained in:
1 parent
1cde3a1f78
commit
2610c87089
2 files changed
+11
-3
No files matched your search
@@ -102,7 +102,9 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<li
|
<li
|
||||||
class="py-3 {highlight} {$$props.class}"
|
class="py-3 relative {node.comment_view.comment.distinguished
|
||||||
|
? ' text-primary-900 dark:text-primary-100'
|
||||||
|
: ''} {highlight} {$$props.class}"
|
||||||
id="#{node.comment_view.comment.id.toString()}"
|
id="#{node.comment_view.comment.id.toString()}"
|
||||||
>
|
>
|
||||||
<Disclosure bind:open class="flex flex-col">
|
<Disclosure bind:open class="flex flex-col">
|
||||||
@@ -160,8 +162,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="flex flex-col whitespace-pre-wrap
|
class="flex flex-col whitespace-pre-wrap
|
||||||
max-w-full gap-1 mt-1"
|
max-w-full gap-1 mt-1 relative"
|
||||||
>
|
>
|
||||||
|
{#if node.comment_view.comment.distinguished}
|
||||||
|
<div
|
||||||
|
class="-z-10 bg-slate-200 dark:bg-zinc-900 absolute -top-9 -bottom-1.5
|
||||||
|
-inset-x-6 -right-6"
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
<div class="max-w-full mt-0.5 break-words text-sm">
|
<div class="max-w-full mt-0.5 break-words text-sm">
|
||||||
<Markdown source={node.comment_view.comment.content} />
|
<Markdown source={node.comment_view.comment.content} />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<Translation bind:open={translating} />
|
<Translation bind:open={translating} />
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="flex flex-row items-center gap-0.5 h-7 relative">
|
<div class="flex flex-row items-center gap-0.5 h-7">
|
||||||
<CommentVote
|
<CommentVote
|
||||||
bind:upvotes={comment.counts.upvotes}
|
bind:upvotes={comment.counts.upvotes}
|
||||||
bind:downvotes={comment.counts.downvotes}
|
bind:downvotes={comment.counts.downvotes}
|
||||||
|
|||||||
Reference in new issue
Block a user