app: start with closed nav for shares (fix #553)

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/743/head
Varun Patil 2023-06-26 15:01:46 -07:00
parent e6597844f7
commit 512ffb8656
1 changed files with 8 additions and 2 deletions

View File

@ -206,11 +206,11 @@ export default defineComponent({
}, },
hasMobileHeader(): boolean { hasMobileHeader(): boolean {
return this.native && this.showNavigation && this.$route.name === 'timeline'; return this.native && this.showNavigation && this.routeIsBase;
}, },
removeNavGap(): boolean { removeNavGap(): boolean {
return this.$route.name === 'map'; return this.routeIsMap;
}, },
}, },
@ -278,6 +278,12 @@ export default defineComponent({
if (this.native) { if (this.native) {
document.documentElement.classList.add('native'); document.documentElement.classList.add('native');
} }
// Close navigation by default if init is disabled
// This is the case for public folder/album shares
if (this.$route.query.noinit) {
emit('toggle-navigation', { open: false });
}
}, },
async beforeMount() { async beforeMount() {