diff --git a/src/client/app/common/views/deck/deck.vue b/src/client/app/common/views/deck/deck.vue index 070312d83..36e0f8161 100644 --- a/src/client/app/common/views/deck/deck.vue +++ b/src/client/app/common/views/deck/deck.vue @@ -106,10 +106,7 @@ export default Vue.extend({ deck.layout = deck.columns.map(c => [c.id]); - this.$store.commit('device/set', { - key: 'deck', - value: deck - }); + this.$store.commit('setDeck', deck); } }, diff --git a/src/client/app/store.ts b/src/client/app/store.ts index b06edb1ed..852d2c393 100644 --- a/src/client/app/store.ts +++ b/src/client/app/store.ts @@ -129,6 +129,11 @@ export default (os: MiOS) => new Vuex.Store({ os.store.dispatch('settings/updateHomeProfile'); }, + setDeck(state, data) { + Vue.set(state.settings.deckProfiles, state.device.deckProfile, data); + os.store.dispatch('settings/updateDeckProfile'); + }, + addHomeWidget(state, widget) { state.settings.homeProfiles[state.device.homeProfile].unshift(widget); os.store.dispatch('settings/updateHomeProfile');