From 2edc48b44cacffee0640c9202c1a3cee12c41907 Mon Sep 17 00:00:00 2001 From: James Xylight Date: Sun, 16 Feb 2025 21:02:45 -0800 Subject: [PATCH] feat: add community header back on press --- src/lib/components/lemmy/post/PostMeta.svelte | 30 +++++++++++++++---- src/lib/components/ui/navbar/Profile.svelte | 6 ++-- .../ui/sidebar/ProfileButton.svelte | 2 +- .../ui/sidebar/SidebarButton.svelte | 6 +--- src/lib/lemmy/ProfileAvatar.svelte | 10 ++++--- src/lib/mono/popover/Popover.svelte | 12 +++++++- 6 files changed, 46 insertions(+), 20 deletions(-) diff --git a/src/lib/components/lemmy/post/PostMeta.svelte b/src/lib/components/lemmy/post/PostMeta.svelte index ada3e47a..dd13601f 100644 --- a/src/lib/components/lemmy/post/PostMeta.svelte +++ b/src/lib/components/lemmy/post/PostMeta.svelte @@ -129,12 +129,30 @@ {style} > {#if showCommunity && community} - + + {#snippet target()} + + {/snippet} + {#snippet popover()} + {#if community && subscribed} +
+ +
+ {/if} + {/snippet} +
{/if} {#if showCommunity && community} {#if profile.data?.user}
diff --git a/src/lib/components/ui/sidebar/ProfileButton.svelte b/src/lib/components/ui/sidebar/ProfileButton.svelte index ff39cb0d..001dc54a 100644 --- a/src/lib/components/ui/sidebar/ProfileButton.svelte +++ b/src/lib/components/ui/sidebar/ProfileButton.svelte @@ -22,7 +22,7 @@ color="tertiary" alignment="left" loading={switching} - loaderWidth={20} + loaderWidth={22} selected={profile.data?.id == prof.id} onclick={async () => { switching = true diff --git a/src/lib/components/ui/sidebar/SidebarButton.svelte b/src/lib/components/ui/sidebar/SidebarButton.svelte index a3487b1c..d05cabbd 100644 --- a/src/lib/components/ui/sidebar/SidebarButton.svelte +++ b/src/lib/components/ui/sidebar/SidebarButton.svelte @@ -1,11 +1,7 @@ {#if profile} -
+
{#if profile.avatar} {profile.username} {:else} { @@ -128,6 +137,7 @@ class="z-[150] {popoverClass}" use:customFloatingContent use:focusTrap + bind:this={popoverEl} > {#if popover}{@render popover()}{:else}