Skip to content

Commit 7ef7788

Browse files
committed
chore: wip
1 parent b329fee commit 7ef7788

File tree

1 file changed

+29
-13
lines changed
  • storage/framework/defaults/components/Dashboard

1 file changed

+29
-13
lines changed

storage/framework/defaults/components/Dashboard/Sidebar.vue

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ const switchTeam = (team: Team) => {
381381
<!-- Section content -->
382382
<ul
383383
role="list"
384-
class="mt-2 -mx-2 space-y-1 section-content"
384+
class="mt-2 -mx-2 space-y-1 section-content max-h-[60vh] overflow-y-auto pr-2"
385385
:class="sections[sectionKey] ? 'expanded' : 'collapsed'"
386386
>
387387
<li v-for="item in sectionContent[sectionKey]?.items || []" :key="item.to">
@@ -482,6 +482,34 @@ const switchTeam = (team: Team) => {
482482
rounded-md p-2 text-sm leading-6 font-semibold;
483483
}
484484
485+
/* Make sure section content is scrollable when it overflows */
486+
.section-content {
487+
@apply overflow-hidden transition-all duration-300 ease-in-out;
488+
}
489+
490+
.section-content.expanded {
491+
@apply overflow-y-auto;
492+
max-height: calc(100vh - 250px);
493+
scrollbar-width: thin;
494+
}
495+
496+
.section-content.collapsed {
497+
max-height: 0;
498+
overflow: hidden;
499+
}
500+
501+
.section-content::-webkit-scrollbar {
502+
width: 4px;
503+
}
504+
505+
.section-content::-webkit-scrollbar-track {
506+
@apply bg-transparent;
507+
}
508+
509+
.section-content::-webkit-scrollbar-thumb {
510+
@apply bg-gray-300 dark:bg-gray-600 rounded;
511+
}
512+
485513
.router-link-active {
486514
@apply bg-blue-gray-50 text-blue-600 dark:bg-gray-700 dark:text-blue-400;
487515
}
@@ -512,18 +540,6 @@ const switchTeam = (team: Team) => {
512540
@apply text-blue-600 dark:text-blue-400 !important;
513541
}
514542
515-
.section-content {
516-
@apply overflow-hidden transition-all duration-300 ease-in-out;
517-
}
518-
519-
.collapsed {
520-
@apply max-h-0;
521-
}
522-
523-
.expanded {
524-
@apply max-h-96;
525-
}
526-
527543
li[draggable="true"] {
528544
@apply touch-none select-none;
529545
will-change: transform;

0 commit comments

Comments
 (0)