fix: broken sidebar

This commit is contained in:
Xylight committed 2024-05-26 19:50:15 -07:00
1 parent 369b258de4
commit 451ad777fb
3 files changed
+22 -15

No files matched your search

+1 -1
View File
@@ -103,7 +103,7 @@
> >
<slot <slot
name="sidebar" name="sidebar"
class="hidden md:flex sticky top-0 left-0 w-full max-w-full h-max bg-slate-50 dark:bg-zinc-950 class="hidden md:flex sticky top-0 left-0 max-w-full h-max bg-slate-50 dark:bg-zinc-950
z-40 z-40
{sidePadding}" {sidePadding}"
style="grid-area: sidebar; width: 100% !important;" style="grid-area: sidebar; width: 100% !important;"
+19 -12
View File
@@ -35,20 +35,24 @@
> >
{#if $profile?.jwt} {#if $profile?.jwt}
<SidebarButton icon={UserCircle} href="/profile/user"> <SidebarButton icon={UserCircle} href="/profile/user">
Profile <span slot="label">Profile</span>
</SidebarButton> </SidebarButton>
<SidebarButton icon={Inbox} href="/inbox"> <SidebarButton icon={Inbox} href="/inbox">
Inbox <span slot="label">
{#if $profile?.user?.notifications.inbox} Inbox
<Badge {#if $profile?.user?.notifications.inbox}
class="w-5 h-5 !p-0 grid place-items-center ml-auto" <Badge
color="red-subtle" class="w-5 h-5 !p-0 grid place-items-center ml-auto"
> color="red-subtle"
{$profile?.user?.notifications.inbox} >
</Badge> {$profile?.user?.notifications.inbox}
{/if} </Badge>
{/if}
</span>
</SidebarButton>
<SidebarButton icon={Bookmark} href="/saved">
<span slot="label">Saved</span>
</SidebarButton> </SidebarButton>
<SidebarButton icon={Bookmark} href="/saved">Saved</SidebarButton>
{:else} {:else}
<SidebarButton href="/login" title="Log In" icon={ArrowLeftOnRectangle}> <SidebarButton href="/login" title="Log In" icon={ArrowLeftOnRectangle}>
<span slot="label">Log In</span> <span slot="label">Log In</span>
@@ -93,7 +97,10 @@
<hr class="border-slate-200 dark:border-zinc-900 my-1" /> <hr class="border-slate-200 dark:border-zinc-900 my-1" />
{/if} {/if}
<Expandable bind:open={$userSettings.expandCommunities}> <Expandable
class="max-w-full min-w-0 w-full"
bind:open={$userSettings.expandCommunities}
>
<span <span
slot="title" slot="title"
class="px-2 py-1 w-full {$userSettings.expandSidebar class="px-2 py-1 w-full {$userSettings.expandSidebar
@@ -24,7 +24,7 @@
? 'text-primary-900 dark:!text-primary-100' ? 'text-primary-900 dark:!text-primary-100'
: 'text-slate-600 dark:text-zinc-400'} {$userSettings.expandSidebar : 'text-slate-600 dark:text-zinc-400'} {$userSettings.expandSidebar
? '' ? ''
: 'max-lg:!p-1 [&>*]:max-lg:!justify-center'} {$$props.class}" : '//max-lg:!p-1 //[&>*]:max-lg:!justify-center'} {$$props.class}"
> >
<slot {selected} name="icon" slot="prefix"> <slot {selected} name="icon" slot="prefix">
{#if icon} {#if icon}
@@ -32,7 +32,7 @@
{/if} {/if}
</slot> </slot>
<slot /> <slot />
<div class={$userSettings.expandSidebar ? 'contents' : 'max-lg:hidden'}> <div class={$userSettings.expandSidebar ? '//contents' : 'max-lg:hidden'}>
<slot name="label" /> <slot name="label" />
</div> </div>
</Button> </Button>