From 6e64324d37e5b89050f965c6912dabb743cad306 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Mon, 3 Sep 2018 22:40:45 +0300 Subject: Fixed collapseMessageWithSubjectLocal always using instance-provided config. --- src/components/settings/settings.js | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'src/components/settings/settings.js') diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index de12894b..8ef84b2a 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -6,21 +6,25 @@ import { filter, trim } from 'lodash' const settings = { data () { + const config = this.$store.state.config + return { - hideAttachmentsLocal: this.$store.state.config.hideAttachments, - hideAttachmentsInConvLocal: this.$store.state.config.hideAttachmentsInConv, - hideNsfwLocal: this.$store.state.config.hideNsfw, - notificationVisibilityLocal: this.$store.state.config.notificationVisibility, - replyVisibilityLocal: this.$store.state.config.replyVisibility, - loopVideoLocal: this.$store.state.config.loopVideo, - loopVideoSilentOnlyLocal: this.$store.state.config.loopVideoSilentOnly, - muteWordsString: this.$store.state.config.muteWords.join('\n'), - autoLoadLocal: this.$store.state.config.autoLoad, - streamingLocal: this.$store.state.config.streaming, - pauseOnUnfocusedLocal: this.$store.state.config.pauseOnUnfocused, - hoverPreviewLocal: this.$store.state.config.hoverPreview, - collapseMessageWithSubjectLocal: this.$store.state.config.collapseMessageWithSubject, - stopGifs: this.$store.state.config.stopGifs, + hideAttachmentsLocal: config.hideAttachments, + hideAttachmentsInConvLocal: config.hideAttachmentsInConv, + hideNsfwLocal: config.hideNsfw, + notificationVisibilityLocal: config.notificationVisibility, + replyVisibilityLocal: config.replyVisibility, + loopVideoLocal: config.loopVideo, + loopVideoSilentOnlyLocal: config.loopVideoSilentOnly, + muteWordsString: config.muteWords.join('\n'), + autoLoadLocal: config.autoLoad, + streamingLocal: config.streaming, + pauseOnUnfocusedLocal: config.pauseOnUnfocused, + hoverPreviewLocal: config.hoverPreview, + collapseMessageWithSubjectLocal: typeof config.collapseMessageWithSubject === 'undefined' + ? config.defaultCollapseMessageWithSubject + : config.collapseMessageWithSubject, + stopGifs: config.stopGifs, loopSilentAvailable: // Firefox Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype, 'mozHasAudio') || -- cgit v1.2.3-70-g09d2 From f1c16327b696666f291d5fb2afdf4033cf9ef76d Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Fri, 7 Sep 2018 18:17:17 +0300 Subject: Initial version --- src/components/settings/settings.js | 4 ++++ src/components/settings/settings.vue | 14 +++++++++++- src/lib/persisted_state.js | 43 +++++++++++++++++++++++++++--------- src/modules/config.js | 21 +++++++++++++++++- 4 files changed, 69 insertions(+), 13 deletions(-) (limited to 'src/components/settings/settings.js') diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 8ef84b2a..5e28c1af 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -42,6 +42,10 @@ const settings = { computed: { user () { return this.$store.state.users.currentUser + }, + currentSaveStateNotice () { + console.log(this.$store.state.config._internal.currentSaveStateNotice && this.$store.state.config._internal.currentSaveStateNotice.error) + return this.$store.state.config._internal.currentSaveStateNotice } }, watch: { diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index c106b79c..be7c64a7 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -1,7 +1,19 @@