diff --git a/platypush/backend/http/webapp/src/components/Nav.vue b/platypush/backend/http/webapp/src/components/Nav.vue index 962f4e054..812c67dd0 100644 --- a/platypush/backend/http/webapp/src/components/Nav.vue +++ b/platypush/backend/http/webapp/src/components/Nav.vue @@ -74,12 +74,18 @@ export default { return ['entities'].concat((panelNames.slice(0, homeIdx).concat(panelNames.slice(homeIdx+1))).sort()) return panelNames.sort() }, + + collapsedDefault() { + if (this.isMobile() || this.isTablet()) + return true + return false + }, }, methods: { onItemClick(name) { this.$emit('select', name) - this.collapsed = true + this.collapsed = this.isMobile() ? true : this.collapsedDefault }, }, @@ -90,6 +96,10 @@ export default { host: null, } }, + + mounted() { + this.collapsed = this.collapsedDefault + }, } @@ -107,6 +117,13 @@ nav { color: $nav-fg; box-shadow: $nav-box-shadow-main; + &.collapsed { + background: $nav-bg-collapsed-mobile; + box-shadow: 1px 1px 1px 1px $default-shadow-color; + margin-bottom: 2px; + z-index: 1; + } + &:not(.collapsed) { position: absolute; top: 0;