aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-01-23 00:10:59 +0300
committerHenry Jameson <me@hjkos.com>2019-01-23 00:15:24 +0300
commitac64e908987ef07e49e4ed26b7e0574e67c01856 (patch)
treed8d8a09780746c2b490000590492f1710110d531 /src
parentc8caa477d7f9d6b793ba0f75c736510f47298014 (diff)
fix custom nsfwCensorImage not working
Diffstat (limited to 'src')
-rw-r--r--src/boot/after_store.js6
-rw-r--r--src/components/attachment/attachment.js2
2 files changed, 3 insertions, 5 deletions
diff --git a/src/boot/after_store.js b/src/boot/after_store.js
index 08c00c64..0169953b 100644
--- a/src/boot/after_store.js
+++ b/src/boot/after_store.js
@@ -24,10 +24,6 @@ const afterStoreSetup = ({ store, i18n }) => {
store.dispatch('setInstanceOption', { name: 'bannerlimit', value: parseInt(uploadlimit.bannerlimit) })
}
- if (data.nsfwCensorImage) {
- store.dispatch('setInstanceOption', { name: 'nsfwCensorImage', value: data.nsfwCensorImage })
- }
-
if (vapidPublicKey) {
store.dispatch('setInstanceOption', { name: 'vapidPublicKey', value: vapidPublicKey })
}
@@ -73,7 +69,9 @@ const afterStoreSetup = ({ store, i18n }) => {
var subjectLineBehavior = (config.subjectLineBehavior)
var alwaysShowSubjectInput = (config.alwaysShowSubjectInput)
var noAttachmentLinks = (config.noAttachmentLinks)
+ var nsfwCensorImage = (config.nsfwCensorImage)
+ store.dispatch('setInstanceOption', { name: 'nsfwCensorImage', value: nsfwCensorImage })
store.dispatch('setInstanceOption', { name: 'theme', value: theme })
store.dispatch('setInstanceOption', { name: 'background', value: background })
store.dispatch('setInstanceOption', { name: 'hidePostStats', value: hidePostStats })
diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js
index 18a03770..9212b74b 100644
--- a/src/components/attachment/attachment.js
+++ b/src/components/attachment/attachment.js
@@ -11,7 +11,7 @@ const Attachment = {
],
data () {
return {
- nsfwImage: this.$store.state.config.nsfwCensorImage || nsfwImage,
+ nsfwImage: this.$store.state.instance.nsfwCensorImage || nsfwImage,
hideNsfwLocal: this.$store.state.config.hideNsfw,
preloadImage: this.$store.state.config.preloadImage,
loopVideo: this.$store.state.config.loopVideo,