diff --git a/src/client/app/desktop/views/pages/deck/deck.vue b/src/client/app/desktop/views/pages/deck/deck.vue index fb5e55086..079260972 100644 --- a/src/client/app/desktop/views/pages/deck/deck.vue +++ b/src/client/app/desktop/views/pages/deck/deck.vue @@ -1,10 +1,12 @@ @@ -13,11 +15,45 @@ import Vue from 'vue'; import XTlColumn from './deck.tl-column.vue'; import XNotificationsColumn from './deck.notifications-column.vue'; +import * as uuid from 'uuid'; export default Vue.extend({ components: { XTlColumn, XNotificationsColumn + }, + computed: { + columns() { + if (this.$store.state.settings.deck == null) return []; + return this.$store.state.settings.deck.columns; + } + }, + created() { + if (this.$store.state.settings.deck == null) { + const deck = { + columns: [/*{ + type: 'widgets', + widgets: [] + }, */{ + id: uuid(), + type: 'home' + }, { + id: uuid(), + type: 'notifications' + }, { + id: uuid(), + type: 'local' + }, { + id: uuid(), + type: 'global' + }] + }; + + this.$store.dispatch('settings/set', { + key: 'deck', + value: deck + }); + } } }); diff --git a/src/client/app/store.ts b/src/client/app/store.ts index 135fbe51f..7795c9477 100644 --- a/src/client/app/store.ts +++ b/src/client/app/store.ts @@ -7,20 +7,7 @@ import { hostname } from './config'; const defaultSettings = { home: null, mobileHome: [], - deck: { - columns: [/*{ - type: 'widgets', - widgets: [] - }, */{ - type: 'home' - }, { - type: 'notifications' - }, { - type: 'local' - }, { - type: 'global' - }] - }, + deck: null, fetchOnScroll: true, showMaps: true, showPostFormOnTopOfTl: false,