diff --git a/src/lib/components/lemmy/comment/CommentActions.svelte b/src/lib/components/lemmy/comment/CommentActions.svelte index 83b0b97c..bd4330cb 100644 --- a/src/lib/components/lemmy/comment/CommentActions.svelte +++ b/src/lib/components/lemmy/comment/CommentActions.svelte @@ -17,7 +17,6 @@ ChatBubbleOvalLeft, EllipsisHorizontal, Flag, - Icon, PencilSquare, Share, Trash, @@ -49,17 +48,17 @@ upvotes={comment.counts.upvotes} downvotes={comment.counts.downvotes} vote={comment.my_vote} - commentId={comment.comment.id} + comment={comment.comment} /> {#if profile.current?.user && (amMod(profile.current?.user, comment.community) || isAdmin(profile.current.user))} diff --git a/src/lib/components/lemmy/comment/CommentVote.svelte b/src/lib/components/lemmy/comment/CommentVote.svelte index e4e206b6..85085f40 100644 --- a/src/lib/components/lemmy/comment/CommentVote.svelte +++ b/src/lib/components/lemmy/comment/CommentVote.svelte @@ -1,27 +1,30 @@ +{#snippet voteButton( + votes: number, + target: 'upvote' | 'downvote', + vote?: number, +)} + {@const targetNum = target == 'upvote' ? 1 : -1} + +{/snippet} +
- -
- + {@render voteButton(upvotes, 'upvote', vote)} +
+ {#if site.data?.site_view.local_site.enable_downvotes ?? true} + {@render voteButton(downvotes, 'downvote', vote)} + {/if}