From d3ef22dac2235691ed5a795d6677e8e4b6d84b8d Mon Sep 17 00:00:00 2001 From: James Xylight Date: Thu, 21 Aug 2025 17:16:18 -0700 Subject: [PATCH] design: improve posts --- .../lemmy/post/actions/PostActionsMenu.svelte | 9 +++- src/lib/components/ui/EndPlaceholder.svelte | 42 ++++++++++++++++--- src/lib/components/ui/sidebar/Sidebar.svelte | 6 +-- src/lib/i18n/en.json | 4 +- src/lib/mono/forms/TextInput.svelte | 2 +- src/lib/mono/forms/select/Select.svelte | 4 +- src/lib/mono/popover/Menu.svelte | 2 +- src/routes/accounts/+page.svelte | 9 ++-- .../post/[instance]/[id=integer]/+page.svelte | 15 +++---- .../[id=integer]/CommentProvider.svelte | 2 +- 10 files changed, 67 insertions(+), 28 deletions(-) diff --git a/src/lib/components/lemmy/post/actions/PostActionsMenu.svelte b/src/lib/components/lemmy/post/actions/PostActionsMenu.svelte index c05e1346..a0773a8a 100644 --- a/src/lib/components/lemmy/post/actions/PostActionsMenu.svelte +++ b/src/lib/components/lemmy/post/actions/PostActionsMenu.svelte @@ -85,7 +85,7 @@
e.stopPropagation()} > {#if !post.post.local} @@ -98,7 +98,12 @@ class="w-full h-full" > {#snippet prefix()} - + {/snippet} {/snippet} diff --git a/src/lib/components/ui/EndPlaceholder.svelte b/src/lib/components/ui/EndPlaceholder.svelte index bab6dbb7..070a7771 100644 --- a/src/lib/components/ui/EndPlaceholder.svelte +++ b/src/lib/components/ui/EndPlaceholder.svelte @@ -1,20 +1,52 @@
{@render children?.()} -
+
{@render action?.()}
diff --git a/src/lib/components/ui/sidebar/Sidebar.svelte b/src/lib/components/ui/sidebar/Sidebar.svelte index 7e8d1b75..83a58214 100644 --- a/src/lib/components/ui/sidebar/Sidebar.svelte +++ b/src/lib/components/ui/sidebar/Sidebar.svelte @@ -97,7 +97,7 @@ > {#snippet title()} - + {$t('account.accounts')} {#snippet action()} @@ -134,7 +134,7 @@ > {#snippet title()} - + {$t('routes.profile.moderates')} {#snippet action()} @@ -185,7 +185,7 @@ > {#snippet title()} - + {$t('profile.subscribed')} {#snippet action()} diff --git a/src/lib/i18n/en.json b/src/lib/i18n/en.json index ee14b6d6..44cf3d97 100644 --- a/src/lib/i18n/en.json +++ b/src/lib/i18n/en.json @@ -281,8 +281,8 @@ "createPost": "Create Post", "createCommunity": "Create Community", "post": { - "crosspostCount": "crossposts", - "commentCount": "comments", + "crosspostCount": "Crossposts", + "commentCount": "Comments", "addComment": "Add a comment", "scrollToTop": "Scroll to top", "instanceWarning": "This post was requested from a different server than your account's. Many actions won't work.", diff --git a/src/lib/mono/forms/TextInput.svelte b/src/lib/mono/forms/TextInput.svelte index f1fcd73d..f15c8040 100644 --- a/src/lib/mono/forms/TextInput.svelte +++ b/src/lib/mono/forms/TextInput.svelte @@ -39,7 +39,7 @@ import Label from '../forms/Label.svelte' import { generateID } from '../forms/helper.js' - const borderClass = `border border-slate-200 border-b-slate-300 dark:border-zinc-800` + const borderClass = `border border-slate-200 border-b-slate-300 dark:border-t-zinc-800 dark:border-zinc-900` let { label = undefined, diff --git a/src/lib/mono/forms/select/Select.svelte b/src/lib/mono/forms/select/Select.svelte index bd4a4ea1..2d992305 100644 --- a/src/lib/mono/forms/select/Select.svelte +++ b/src/lib/mono/forms/select/Select.svelte @@ -88,7 +88,7 @@ }: Props = $props() -
+
{#if customLabel || label}