diff options
Diffstat (limited to 'src/components/settings/settings.js')
| -rw-r--r-- | src/components/settings/settings.js | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 8ef84b2a..a24bc265 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -6,25 +6,27 @@ import { filter, trim } from 'lodash' const settings = { data () { - const config = this.$store.state.config + const user = this.$store.state.config + const instance = this.$store.state.instance return { - 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, + hideAttachmentsLocal: user.hideAttachments, + hideAttachmentsInConvLocal: user.hideAttachmentsInConv, + hideNsfwLocal: user.hideNsfw, + notificationVisibilityLocal: user.notificationVisibility, + replyVisibilityLocal: user.replyVisibility, + loopVideoLocal: user.loopVideo, + loopVideoSilentOnlyLocal: user.loopVideoSilentOnly, + muteWordsString: user.muteWords.join('\n'), + autoLoadLocal: user.autoLoad, + streamingLocal: user.streaming, + pauseOnUnfocusedLocal: user.pauseOnUnfocused, + hoverPreviewLocal: user.hoverPreview, + collapseMessageWithSubjectLocal: typeof user.collapseMessageWithSubject === 'undefined' + ? instance.collapseMessageWithSubject + : user.collapseMessageWithSubject, + collapseMessageWithSubjectDefault: this.$t('settings.values.' + instance.collapseMessageWithSubject), + stopGifs: user.stopGifs, loopSilentAvailable: // Firefox Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype, 'mozHasAudio') || @@ -42,6 +44,9 @@ const settings = { computed: { user () { return this.$store.state.users.currentUser + }, + currentSaveStateNotice () { + return this.$store.state.interface.settings.currentSaveStateNotice } }, watch: { |
