From d5d4f69e0dfb254a2c36d73ee89ffdf01dfe6551 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Tue, 15 Aug 2023 16:21:34 -0700 Subject: [PATCH] feat: add new vvote design to comments --- .../lemmy/comment/CommentActions.svelte | 6 +- .../lemmy/comment/CommentVote.svelte | 113 +++++++++++++----- .../moderation/CommentModerationMenu.svelte | 23 +--- src/lib/components/lemmy/post/PostVote.svelte | 2 +- src/routes/communities/+page.svelte | 5 +- 5 files changed, 97 insertions(+), 52 deletions(-) diff --git a/src/lib/components/lemmy/comment/CommentActions.svelte b/src/lib/components/lemmy/comment/CommentActions.svelte index 905f45e4..f31e2d30 100644 --- a/src/lib/components/lemmy/comment/CommentActions.svelte +++ b/src/lib/components/lemmy/comment/CommentActions.svelte @@ -69,8 +69,8 @@ commentId={comment.comment.id} /> diff --git a/src/lib/components/lemmy/comment/CommentVote.svelte b/src/lib/components/lemmy/comment/CommentVote.svelte index e454067c..04508f2d 100644 --- a/src/lib/components/lemmy/comment/CommentVote.svelte +++ b/src/lib/components/lemmy/comment/CommentVote.svelte @@ -1,9 +1,17 @@ -
- - - {score} - - + + + + +
+{:else}
- - -
+ + + + + + +{/if} diff --git a/src/lib/components/lemmy/moderation/CommentModerationMenu.svelte b/src/lib/components/lemmy/moderation/CommentModerationMenu.svelte index d5fe4c58..5d06eda8 100644 --- a/src/lib/components/lemmy/moderation/CommentModerationMenu.svelte +++ b/src/lib/components/lemmy/moderation/CommentModerationMenu.svelte @@ -14,34 +14,21 @@ import { Color } from '$lib/ui/colors.js' import { isComment } from '$lib/lemmy/item.js' import { profile } from '$lib/auth.js' + import ShieldIcon from '$lib/components/lemmy/moderation/ShieldIcon.svelte' export let item: PostView | CommentView {#if ($profile?.user && amMod($profile.user, item.community)) || ($profile?.user && isAdmin($profile.user) && item.community.local)}
  • diff --git a/src/lib/components/lemmy/post/PostVote.svelte b/src/lib/components/lemmy/post/PostVote.svelte index 425123a0..f8447831 100644 --- a/src/lib/components/lemmy/post/PostVote.svelte +++ b/src/lib/components/lemmy/post/PostVote.svelte @@ -85,7 +85,7 @@ {#if $userSettings.newVote} -
    +