diff options
| author | Henry Jameson <me@hjkos.com> | 2018-09-09 21:21:23 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-09-17 17:51:39 +0300 |
| commit | 82fa5d08c4f441fa9df20edab214b99ecb7776b3 (patch) | |
| tree | 019ea9955fbe3cd208b65beb7a4abd4339bde23d /src/components/settings | |
| parent | 2db991fc7fb1eda11b94d585d3b56f9d94c81286 (diff) | |
more refactoring
Diffstat (limited to 'src/components/settings')
| -rw-r--r-- | src/components/settings/settings.js | 35 | ||||
| -rw-r--r-- | src/components/settings/settings.vue | 2 |
2 files changed, 19 insertions, 18 deletions
diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 6d481820..856ca40e 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -6,25 +6,26 @@ 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, + stopGifs: user.stopGifs, loopSilentAvailable: // Firefox Object.getOwnPropertyDescriptor(HTMLVideoElement.prototype, 'mozHasAudio') || diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index 481cdf09..55ffa591 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -7,7 +7,7 @@ <transition name="fade"> <template v-if="currentSaveStateNotice"> - <div @click.prevent class="alert error" v-if="!currentSaveStateNotice.error"> + <div @click.prevent class="alert error" v-if="currentSaveStateNotice.error"> Errr </div> |
