From d8cd24fab0bd454bd543200e71a17601afbb9f87 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 6 Jun 2018 03:03:56 +0900 Subject: [PATCH] wip --- src/client/app/common/scripts/streaming/home.ts | 2 -- src/client/app/desktop/views/components/home.vue | 6 ++++-- src/client/app/store.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/client/app/common/scripts/streaming/home.ts b/src/client/app/common/scripts/streaming/home.ts index f07d0289f6..a27c55a60d 100644 --- a/src/client/app/common/scripts/streaming/home.ts +++ b/src/client/app/common/scripts/streaming/home.ts @@ -1,5 +1,3 @@ -import * as merge from 'object-assign-deep'; - import Stream from './stream'; import StreamManager from './stream-manager'; import MiOS from '../../../mios'; diff --git a/src/client/app/desktop/views/components/home.vue b/src/client/app/desktop/views/components/home.vue index d3ba84a4b3..c30ca68210 100644 --- a/src/client/app/desktop/views/components/home.vue +++ b/src/client/app/desktop/views/components/home.vue @@ -147,7 +147,7 @@ export default Vue.extend({ computed: { home(): any[] { - return this.$store.state.settings.home; + return this.$store.state.settings.home || []; }, left(): any[] { return this.home.filter(w => w.place == 'left'); @@ -164,9 +164,11 @@ export default Vue.extend({ }, created() { - if (this.$store.state.i.clientSettings == null || this.$store.state.i.clientSettings.home == null) { + if (this.$store.state.settings.home == null) { this.api('i/update_home', { home: _defaultDesktopHomeWidgets + }).then(() => { + this.$store.commit('settings/setHome', _defaultDesktopHomeWidgets); }); } }, diff --git a/src/client/app/store.ts b/src/client/app/store.ts index 00cae3b857..135fbe51f5 100644 --- a/src/client/app/store.ts +++ b/src/client/app/store.ts @@ -5,7 +5,7 @@ import MiOS from './mios'; import { hostname } from './config'; const defaultSettings = { - home: [], + home: null, mobileHome: [], deck: { columns: [/*{