diff --git a/client/src/services/sidebarMenu.ts b/client/src/services/sidebarMenu.ts index 314f660282e..8221010d057 100644 --- a/client/src/services/sidebarMenu.ts +++ b/client/src/services/sidebarMenu.ts @@ -3,8 +3,9 @@ import { ref } from 'vue'; const defaultWidth = 300; -const initialWidth = ref(defaultWidth); +const hiddenWidth = 2; const computedWidth = ref(defaultWidth); +const storedWidth = ref(defaultWidth); export default function useSidebarMenu(): any { function isVisible(): boolean { @@ -12,15 +13,19 @@ export default function useSidebarMenu(): any { } function reset(): void { - initialWidth.value = defaultWidth; - computedWidth.value = defaultWidth; + computedWidth.value = storedWidth.value; + } + + function hide(): void { + storedWidth.value = computedWidth.value; + computedWidth.value = hiddenWidth; } return { - defaultWidth, - initialWidth, computedWidth, + storedWidth, isVisible, reset, + hide, }; } diff --git a/client/src/views/client-area/ClientAreaHeader.vue b/client/src/views/client-area/ClientAreaHeader.vue index 31767719862..9a9a84998d0 100644 --- a/client/src/views/client-area/ClientAreaHeader.vue +++ b/client/src/views/client-area/ClientAreaHeader.vue @@ -2,18 +2,6 @@