forked from platypush/platypush
Keep the main menu open on page load by default on >= desktop
This commit is contained in:
parent
fecd96f64c
commit
f28f08dd1a
1 changed files with 18 additions and 1 deletions
|
@ -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
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue