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 ['entities'].concat((panelNames.slice(0, homeIdx).concat(panelNames.slice(homeIdx+1))).sort())
|
||||||
return panelNames.sort()
|
return panelNames.sort()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
collapsedDefault() {
|
||||||
|
if (this.isMobile() || this.isTablet())
|
||||||
|
return true
|
||||||
|
return false
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
onItemClick(name) {
|
onItemClick(name) {
|
||||||
this.$emit('select', name)
|
this.$emit('select', name)
|
||||||
this.collapsed = true
|
this.collapsed = this.isMobile() ? true : this.collapsedDefault
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -90,6 +96,10 @@ export default {
|
||||||
host: null,
|
host: null,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.collapsed = this.collapsedDefault
|
||||||
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -107,6 +117,13 @@ nav {
|
||||||
color: $nav-fg;
|
color: $nav-fg;
|
||||||
box-shadow: $nav-box-shadow-main;
|
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) {
|
&:not(.collapsed) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
|
Loading…
Reference in a new issue