fix sidebar navigation overflowing, add scrollbar only to nav items

This commit is contained in:
Gregor Vostrak
2024-09-09 13:34:26 +02:00
committed by Constantin Graf
parent b990387775
commit f0705e1e4a

View File

@@ -79,8 +79,8 @@ const page = usePage<{
'!flex bg-default-background w-full z-[9999999999]': '!flex bg-default-background w-full z-[9999999999]':
showSidebarMenu, showSidebarMenu,
}" }"
class="flex-shrink-0 h-screen hidden fixed w-[230px] 2xl:w-[250px] px-2.5 2xl:px-4 py-4 lg:flex flex-col justify-between"> class="flex-shrink-0 h-screen hidden fixed w-[230px] 2xl:w-[250px] px-2.5 2xl:px-3 py-4 lg:flex flex-col justify-between">
<div> <div class="flex flex-col h-full">
<div <div
class="border-b border-default-background-separator pb-2 flex justify-between"> class="border-b border-default-background-separator pb-2 flex justify-between">
<OrganizationSwitcher class="w-full"></OrganizationSwitcher> <OrganizationSwitcher class="w-full"></OrganizationSwitcher>
@@ -91,12 +91,13 @@ const page = usePage<{
<div class="border-b border-default-background-separator"> <div class="border-b border-default-background-separator">
<CurrentSidebarTimer></CurrentSidebarTimer> <CurrentSidebarTimer></CurrentSidebarTimer>
</div> </div>
<nav <div
class="pt-2 overflow-y-scroll" class="overflow-y-scroll flex-1 w-[calc(100%+10px)]"
style=" style="
scrollbar-width: thin; scrollbar-width: thin;
scrollbar-color: var(--color-bg-primary) transparent; scrollbar-color: var(--color-bg-primary) transparent;
"> ">
<nav class="pt-2">
<ul> <ul>
<NavigationSidebarItem <NavigationSidebarItem
title="Dashboard" title="Dashboard"
@@ -114,7 +115,9 @@ const page = usePage<{
title="Reporting" title="Reporting"
:icon="ChartBarIcon" :icon="ChartBarIcon"
:current="route().current('reporting')" :current="route().current('reporting')"
:href="route('reporting')"></NavigationSidebarItem> :href="
route('reporting')
"></NavigationSidebarItem>
</ul> </ul>
</nav> </nav>
@@ -138,13 +141,17 @@ const page = usePage<{
title="Clients" title="Clients"
:icon="UserCircleIcon" :icon="UserCircleIcon"
:current="route().current('clients')" :current="route().current('clients')"
:href="route('clients')"></NavigationSidebarItem> :href="
route('clients')
"></NavigationSidebarItem>
<NavigationSidebarItem <NavigationSidebarItem
title="Members" title="Members"
v-if="canViewMembers()" v-if="canViewMembers()"
:icon="UserGroupIcon" :icon="UserGroupIcon"
:current="route().current('members')" :current="route().current('members')"
:href="route('members')"></NavigationSidebarItem> :href="
route('members')
"></NavigationSidebarItem>
<NavigationSidebarItem <NavigationSidebarItem
v-if="canViewTags()" v-if="canViewTags()"
title="Tags" title="Tags"
@@ -162,7 +169,9 @@ const page = usePage<{
<nav> <nav>
<ul> <ul>
<NavigationSidebarItem <NavigationSidebarItem
v-if="canManageBilling() && isBillingActivated()" v-if="
canManageBilling() && isBillingActivated()
"
title="Billing" title="Billing"
:icon="CreditCardIcon" :icon="CreditCardIcon"
href="/billing"></NavigationSidebarItem> href="/billing"></NavigationSidebarItem>
@@ -191,8 +200,7 @@ const page = usePage<{
</ul> </ul>
</nav> </nav>
</div> </div>
<div class="justify-self-end">
<div>
<UpdateSidebarNotification></UpdateSidebarNotification> <UpdateSidebarNotification></UpdateSidebarNotification>
<ul <ul
class="border-t border-default-background-separator pt-3 flex justify-between pr-4 items-center"> class="border-t border-default-background-separator pt-3 flex justify-between pr-4 items-center">
@@ -200,12 +208,15 @@ const page = usePage<{
class="flex-1" class="flex-1"
title="Profile Settings" title="Profile Settings"
:icon="Cog6ToothIcon" :icon="Cog6ToothIcon"
:href="route('profile.show')"></NavigationSidebarItem> :href="
route('profile.show')
"></NavigationSidebarItem>
<UserSettingsIcon></UserSettingsIcon> <UserSettingsIcon></UserSettingsIcon>
</ul> </ul>
</div> </div>
</div> </div>
</div>
<div class="flex-1 lg:ml-[230px] 2xl:ml-[250px] min-w-0"> <div class="flex-1 lg:ml-[230px] 2xl:ml-[250px] min-w-0">
<div <div
class="lg:hidden w-full px-3 py-1 border-b border-b-default-background-separator text-muted flex justify-between items-center"> class="lg:hidden w-full px-3 py-1 border-b border-b-default-background-separator text-muted flex justify-between items-center">