From 3aee0a19935e4df53b24e45f87973c06750837b9 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 f07d0289f..a27c55a60 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 d3ba84a4b..c30ca6821 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 00cae3b85..135fbe51f 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: [/*{