fix: broken sidebar
This commit is contained in:
1 parent
369b258de4
commit
451ad777fb
3 files changed
+22
-15
No files matched your search
@@ -103,7 +103,7 @@
|
||||
>
|
||||
<slot
|
||||
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
|
||||
{sidePadding}"
|
||||
style="grid-area: sidebar; width: 100% !important;"
|
||||
|
||||
@@ -35,20 +35,24 @@
|
||||
>
|
||||
{#if $profile?.jwt}
|
||||
<SidebarButton icon={UserCircle} href="/profile/user">
|
||||
Profile
|
||||
<span slot="label">Profile</span>
|
||||
</SidebarButton>
|
||||
<SidebarButton icon={Inbox} href="/inbox">
|
||||
Inbox
|
||||
{#if $profile?.user?.notifications.inbox}
|
||||
<Badge
|
||||
class="w-5 h-5 !p-0 grid place-items-center ml-auto"
|
||||
color="red-subtle"
|
||||
>
|
||||
{$profile?.user?.notifications.inbox}
|
||||
</Badge>
|
||||
{/if}
|
||||
<span slot="label">
|
||||
Inbox
|
||||
{#if $profile?.user?.notifications.inbox}
|
||||
<Badge
|
||||
class="w-5 h-5 !p-0 grid place-items-center ml-auto"
|
||||
color="red-subtle"
|
||||
>
|
||||
{$profile?.user?.notifications.inbox}
|
||||
</Badge>
|
||||
{/if}
|
||||
</span>
|
||||
</SidebarButton>
|
||||
<SidebarButton icon={Bookmark} href="/saved">
|
||||
<span slot="label">Saved</span>
|
||||
</SidebarButton>
|
||||
<SidebarButton icon={Bookmark} href="/saved">Saved</SidebarButton>
|
||||
{:else}
|
||||
<SidebarButton href="/login" title="Log In" icon={ArrowLeftOnRectangle}>
|
||||
<span slot="label">Log In</span>
|
||||
@@ -93,7 +97,10 @@
|
||||
<hr class="border-slate-200 dark:border-zinc-900 my-1" />
|
||||
{/if}
|
||||
|
||||
<Expandable bind:open={$userSettings.expandCommunities}>
|
||||
<Expandable
|
||||
class="max-w-full min-w-0 w-full"
|
||||
bind:open={$userSettings.expandCommunities}
|
||||
>
|
||||
<span
|
||||
slot="title"
|
||||
class="px-2 py-1 w-full {$userSettings.expandSidebar
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
? 'text-primary-900 dark:!text-primary-100'
|
||||
: '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">
|
||||
{#if icon}
|
||||
@@ -32,7 +32,7 @@
|
||||
{/if}
|
||||
</slot>
|
||||
<slot />
|
||||
<div class={$userSettings.expandSidebar ? 'contents' : 'max-lg:hidden'}>
|
||||
<div class={$userSettings.expandSidebar ? '//contents' : 'max-lg:hidden'}>
|
||||
<slot name="label" />
|
||||
</div>
|
||||
</Button>
|
||||
Reference in new issue
Block a user