From 2017b763f2edb1a8aa1d17c4d85b1e7526971131 Mon Sep 17 00:00:00 2001 From: dakkar Date: Sat, 21 Sep 2024 17:10:05 +0100 Subject: [PATCH] fix #332 - classic view navbar now respects "side (icon only)" * removed `menuDisplay` computed variable * directly access `defaultStore` in `calcViewState` * actually call `calcViewState` at setup! all three these changes were copied from `universal.vue`, the default view. --- packages/frontend/src/ui/classic.sidebar.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/ui/classic.sidebar.vue b/packages/frontend/src/ui/classic.sidebar.vue index d49df8e8ac..68fa2e1ba0 100644 --- a/packages/frontend/src/ui/classic.sidebar.vue +++ b/packages/frontend/src/ui/classic.sidebar.vue @@ -66,7 +66,6 @@ import { i18n } from '@/i18n.js'; const WINDOW_THRESHOLD = 1400; const menu = ref(defaultStore.state.menu); -const menuDisplay = computed(defaultStore.makeGetterSetter('menuDisplay')); const otherNavItemIndicated = computed(() => { for (const def in navbarItemDef) { if (menu.value.includes(def)) continue; @@ -81,10 +80,12 @@ const iconOnly = ref(false); const settingsWindowed = ref(false); function calcViewState() { - iconOnly.value = (window.innerWidth <= WINDOW_THRESHOLD) || (menuDisplay.value === 'sideIcon'); + iconOnly.value = (window.innerWidth <= WINDOW_THRESHOLD) || (defaultStore.state.menuDisplay === 'sideIcon'); settingsWindowed.value = (window.innerWidth > WINDOW_THRESHOLD); } +calcViewState(); + function more(ev: MouseEvent) { const { dispose } = os.popup(defineAsyncComponent(() => import('@/components/MkLaunchPad.vue')), { src: ev.currentTarget ?? ev.target,