From 8946ff983831a6509cab61102d2354d28de486f6 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 22 Jan 2019 23:57:27 +0300 Subject: fix errors in console --- src/components/attachment/attachment.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/components/attachment') diff --git a/src/components/attachment/attachment.vue b/src/components/attachment/attachment.vue index b80300b4..d7f25953 100644 --- a/src/components/attachment/attachment.vue +++ b/src/components/attachment/attachment.vue @@ -10,7 +10,7 @@ Hide - + -- cgit v1.2.3-70-g09d2 From ac64e908987ef07e49e4ed26b7e0574e67c01856 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 23 Jan 2019 00:10:59 +0300 Subject: fix custom nsfwCensorImage not working --- src/boot/after_store.js | 6 ++---- src/components/attachment/attachment.js | 2 +- static/config.json | 3 ++- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/components/attachment') 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, diff --git a/static/config.json b/static/config.json index cc72900a..24e26696 100644 --- a/static/config.json +++ b/static/config.json @@ -18,5 +18,6 @@ "hideUserStats": false, "loginMethod": "password", "webPushNotifications": false, - "noAttachmentLinks": false + "noAttachmentLinks": false, + "nsfwCensorImage": "" } -- cgit v1.2.3-70-g09d2