From 2f0241df2e6f0f443ea3d5ef2a0571dc6ae8c069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Mon, 2 Sep 2024 07:57:08 +0200 Subject: [PATCH] fix: Hide navigation initially on mobile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- src/App.vue | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/App.vue b/src/App.vue index 285cf97a9..f43f6c516 100644 --- a/src/App.vue +++ b/src/App.vue @@ -33,7 +33,7 @@ import { mapState } from 'vuex' import AppNavigation from './components/navigation/AppNavigation.vue' import KeyboardShortcuts from './components/KeyboardShortcuts.vue' -import { NcModal, NcContent, NcAppContent } from '@nextcloud/vue' +import { NcModal, NcContent, NcAppContent, isMobile } from '@nextcloud/vue' import { BoardApi } from './services/BoardApi.js' import { emit, subscribe } from '@nextcloud/event-bus' import { loadState } from '@nextcloud/initial-state' @@ -51,6 +51,7 @@ export default { NcAppContent, KeyboardShortcuts, }, + mixins: [isMobile], provide() { return { boardApi, @@ -107,7 +108,7 @@ export default { }, mounted() { // Set navigation to initial state and update in case it gets toggled - emit('toggle-navigation', { open: this.navShown, _initial: true }) + emit('toggle-navigation', { open: !this.isMobile && this.navShown, _initial: true }) this.$nextTick(() => { subscribe('navigation-toggled', (navState) => { this.$store.dispatch('toggleNav', navState.open)