Merge pull request #182 from scmmishra/sidebar-toggle-fix
fix: inconsistent sidebar group toggle on navigation
This commit is contained in:
commit
eaba083e1d
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
<b-menu-item :expanded="activeGroup.lists"
|
<b-menu-item :expanded="activeGroup.lists"
|
||||||
:active="activeGroup.lists"
|
:active="activeGroup.lists"
|
||||||
|
v-on:update:active="(state) => toggleGroup('lists', state)"
|
||||||
icon="format-list-bulleted-square" label="Lists">
|
icon="format-list-bulleted-square" label="Lists">
|
||||||
<b-menu-item :to="{name: 'lists'}" tag="router-link"
|
<b-menu-item :to="{name: 'lists'}" tag="router-link"
|
||||||
:active="activeItem.lists"
|
:active="activeItem.lists"
|
||||||
|
@ -45,6 +46,7 @@
|
||||||
|
|
||||||
<b-menu-item :expanded="activeGroup.subscribers"
|
<b-menu-item :expanded="activeGroup.subscribers"
|
||||||
:active="activeGroup.subscribers"
|
:active="activeGroup.subscribers"
|
||||||
|
v-on:update:active="(state) => toggleGroup('subscribers', state)"
|
||||||
icon="account-multiple" label="Subscribers">
|
icon="account-multiple" label="Subscribers">
|
||||||
<b-menu-item :to="{name: 'subscribers'}" tag="router-link"
|
<b-menu-item :to="{name: 'subscribers'}" tag="router-link"
|
||||||
:active="activeItem.subscribers"
|
:active="activeItem.subscribers"
|
||||||
|
@ -56,8 +58,9 @@
|
||||||
</b-menu-item><!-- subscribers -->
|
</b-menu-item><!-- subscribers -->
|
||||||
|
|
||||||
<b-menu-item :expanded="activeGroup.campaigns"
|
<b-menu-item :expanded="activeGroup.campaigns"
|
||||||
:active="activeGroup.campaigns"
|
:active="activeGroup.campaigns"
|
||||||
icon="rocket-launch-outline" label="Campaigns">
|
v-on:update:active="(state) => toggleGroup('campaigns', state)"
|
||||||
|
icon="rocket-launch-outline" label="Campaigns">
|
||||||
<b-menu-item :to="{name: 'campaigns'}" tag="router-link"
|
<b-menu-item :to="{name: 'campaigns'}" tag="router-link"
|
||||||
:active="activeItem.campaigns"
|
:active="activeItem.campaigns"
|
||||||
icon="rocket-launch-outline" label="All campaigns"></b-menu-item>
|
icon="rocket-launch-outline" label="All campaigns"></b-menu-item>
|
||||||
|
@ -150,6 +153,9 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
toggleGroup(group, state) {
|
||||||
|
this.activeGroup = state ? { [group]: true } : {};
|
||||||
|
},
|
||||||
reloadApp() {
|
reloadApp() {
|
||||||
this.$api.reloadApp().then(() => {
|
this.$api.reloadApp().then(() => {
|
||||||
this.$utils.toast('Reloading app ...');
|
this.$utils.toast('Reloading app ...');
|
||||||
|
|
|
@ -8,7 +8,7 @@ module.exports = {
|
||||||
// and the URI for assets are tightly coupled. This is handled in the Go app
|
// and the URI for assets are tightly coupled. This is handled in the Go app
|
||||||
// by using stuffbin aliases.
|
// by using stuffbin aliases.
|
||||||
assetsDir: 'frontend',
|
assetsDir: 'frontend',
|
||||||
|
|
||||||
// Move the index.html file from dist/index.html to dist/frontend/index.html
|
// Move the index.html file from dist/index.html to dist/frontend/index.html
|
||||||
indexPath: './frontend/index.html',
|
indexPath: './frontend/index.html',
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue