From 1a12533fa83a2096dccc17cdf9191cf10826f6a9 Mon Sep 17 00:00:00 2001 From: Xylight Date: Fri, 19 Sep 2025 16:39:32 -0700 Subject: [PATCH] impr: you know im not sure if people actually read these. so i can put anything i want --- .../lemmy/comment/CommentActions.svelte | 7 +- .../lemmy/comment/CommentVote.svelte | 137 +++++++++++------- src/lib/components/ui/Expandable.svelte | 2 +- 3 files changed, 85 insertions(+), 61 deletions(-) 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}