summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-04-18 21:40:36 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-04-18 21:40:36 +0900
commit8aaab195c6f6d763446e0635e2745f3e18fe852a (patch)
treed6eae34e0034c9a159798ed43809c8cea2778c99 /src
parentUse - (diff)
downloadsharkey-8aaab195c6f6d763446e0635e2745f3e18fe852a.tar.gz
sharkey-8aaab195c6f6d763446e0635e2745f3e18fe852a.tar.bz2
sharkey-8aaab195c6f6d763446e0635e2745f3e18fe852a.zip
Fix bug
Diffstat (limited to 'src')
-rw-r--r--src/client/app/mobile/views/pages/widgets.vue13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/client/app/mobile/views/pages/widgets.vue b/src/client/app/mobile/views/pages/widgets.vue
index 33166825cb..7130fddb34 100644
--- a/src/client/app/mobile/views/pages/widgets.vue
+++ b/src/client/app/mobile/views/pages/widgets.vue
@@ -72,13 +72,13 @@ export default Vue.extend({
computed: {
widgets(): any[] {
- return this.$store.state.settings.mobileHome;
+ return this.$store.state.device.mobileHome;
}
},
created() {
if (this.widgets.length == 0) {
- this.widgets = [{
+ this.$store.commit('device/setMobileHome', [{
name: 'calendar',
id: 'a', data: {}
}, {
@@ -96,8 +96,7 @@ export default Vue.extend({
}, {
name: 'version',
id: 'g', data: {}
- }];
- this.saveHome();
+ }]);
}
},
@@ -123,7 +122,7 @@ export default Vue.extend({
},
addWidget() {
- this.$store.commit('settings/addMobileHomeWidget', {
+ this.$store.commit('device/addMobileHomeWidget', {
name: this.widgetAdderSelected,
id: uuid(),
data: {}
@@ -131,11 +130,11 @@ export default Vue.extend({
},
removeWidget(widget) {
- this.$store.commit('settings/removeMobileHomeWidget', widget);
+ this.$store.commit('device/removeMobileHomeWidget', widget);
},
saveHome() {
- this.$store.commit('settings/setMobileHome', this.widgets);
+ this.$store.commit('device/setMobileHome', this.widgets);
}
}
});