From bb5f4c2162b15aa6ca68f132c3780dd999f89746 Mon Sep 17 00:00:00 2001 From: Xylight Date: Sat, 16 Mar 2024 14:57:22 -0700 Subject: [PATCH] feat: add inbox to sidebar --- src/lib/components/ui/sidebar/Sidebar.svelte | 27 ++++++++++++++++---- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/lib/components/ui/sidebar/Sidebar.svelte b/src/lib/components/ui/sidebar/Sidebar.svelte index 3dcf64f5..55804c7c 100644 --- a/src/lib/components/ui/sidebar/Sidebar.svelte +++ b/src/lib/components/ui/sidebar/Sidebar.svelte @@ -7,6 +7,7 @@ Home, Icon, Identification, + Inbox, MagnifyingGlass, ServerStack, UserGroup, @@ -18,7 +19,7 @@ import ProfileButton from '$lib/components/ui/sidebar/ProfileButton.svelte' import { flip } from 'svelte/animate' import { expoOut } from 'svelte/easing' - import { Button } from 'mono-svelte' + import { Badge, Button } from 'mono-svelte' import { DEFAULT_INSTANCE_URL, LINKED_INSTANCE_URL } from '$lib/instance.js' import Expandable from '$lib/components/ui/Expandable.svelte' import EndPlaceholder from '../EndPlaceholder.svelte' @@ -40,26 +41,42 @@ - + Frontpage Settings - + Search - + Communities + {#if $profile?.jwt} + + + + Inbox + {#if ($profile?.user?.notifications.inbox ?? 0) > 0} + + {$profile?.user?.notifications.inbox} + + {/if} + + + {/if} {#if $profileData.profiles.length >= 1}
{#each [...$profileData.profiles] as prof, index (prof.id)}