diff --git a/src/App.vue b/src/App.vue index 6a05a2f80..0011e48f0 100644 --- a/src/App.vue +++ b/src/App.vue @@ -91,7 +91,7 @@
{ } document.addEventListener('mousemove', resetHideMouseTimeout) + +// Control bottom bar momentary hiding +const showBottomBarNow = ref(widgetStore.currentView.showBottomBarOnBoot) +watch([() => widgetStore.currentView, () => widgetStore.currentView.showBottomBarOnBoot], () => { + showBottomBarNow.value = widgetStore.currentView.showBottomBarOnBoot +}) +const debouncedToggleBottomBar = useDebounceFn(() => (showBottomBarNow.value = !showBottomBarNow.value), 25) +const bottomBarToggleCallbackId = registerActionCallback(CockpitAction.TOGGLE_BOTTOM_BAR, debouncedToggleBottomBar) +onBeforeUnmount(() => unregisterActionCallback(bottomBarToggleCallbackId))