Skip to content

Commit 4c34c6b

Browse files
committed
Hide the dashboard menu dividers when menus are closed
1 parent c845ab7 commit 4c34c6b

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

layouts/dashboard.vue

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,17 @@ onUnmounted(() => {
5151
</script>
5252

5353
<template>
54-
<div class="dashboard flex flex-col lg:flex-row h-screen w-screen min-h-0 min-w-0 overflow-hidden border-t border-layer">
55-
<Gutter :show="isPrimaryGutterShowing" :size="256" class="hidden lg:flex">
54+
<div class="dashboard flex flex-col lg:flex-row h-screen w-screen min-h-0 min-w-0 overflow-hidden">
55+
<Gutter
56+
:show="isPrimaryGutterShowing"
57+
:size="256"
58+
class="hidden lg:flex"
59+
>
5660
<TheLeftSidebar class="flex flex-grow flex-shrink overflow-hidden w-full" />
5761
</Gutter>
58-
<FlexDivider class="hidden lg:block" />
62+
<Transition name="divider">
63+
<FlexDivider v-show="isPrimaryGutterShowing" class="hidden lg:block" />
64+
</Transition>
5965
<CoreLayer class="bg-layer basis-full flex flex-col flex-grow flex-shrink min-h-0">
6066
<div class="flex p-1 items-center">
6167
<div class="flex gap-1 flex-row-reverse lg:flex-row items-center basis-full justify-start">
@@ -120,8 +126,14 @@ onUnmounted(() => {
120126
</section>
121127
</div>
122128
</CoreLayer>
123-
<FlexDivider class="hidden lg:block" />
124-
<Gutter :show="isSecondaryGutterShowing" :size="256" class="hidden lg:flex justify-end flex-nowrap">
129+
<Transition name="divider">
130+
<FlexDivider v-show="isSecondaryGutterShowing" class="hidden lg:block" />
131+
</Transition>
132+
<Gutter
133+
:show="isSecondaryGutterShowing"
134+
:size="256"
135+
class="hidden lg:flex justify-end flex-nowrap"
136+
>
125137
<TheRightSidebar class="hidden lg:flex flex-grow flex-shrink-0 w-full" />
126138
</Gutter>
127139
<ToastList class="fixed bottom-8 right-8 m-auto" />
@@ -132,4 +144,9 @@ onUnmounted(() => {
132144
.dashboard {
133145
height: var(--app-height, 100vh);
134146
}
147+
148+
.divider-enter-active,
149+
.divider-leave-active {
150+
transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
151+
}
135152
</style>

0 commit comments

Comments
 (0)