logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: aa7cff92aab00826ec1e794661d09a5e6d29c045
parent: 25a88da17abf9ab1282076aa52f2f061b341fc0d
Author: Shpuld Shpludson <shp@cock.li>
Date:   Thu, 13 Dec 2018 15:04:55 +0000

Merge branch 'feature/configurable-nsfw-censor-image' into 'develop'

make nsfw censor image configurable

See merge request pleroma/pleroma-fe!243

Diffstat:

Msrc/components/attachment/attachment.js2+-
Msrc/main.js3+++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js @@ -11,7 +11,7 @@ const Attachment = { ], data () { return { - nsfwImage, + nsfwImage: this.$store.state.config.nsfwCensorImage || nsfwImage, hideNsfwLocal: this.$store.state.config.hideNsfw, preloadImage: this.$store.state.config.preloadImage, loopVideo: this.$store.state.config.loopVideo, diff --git a/src/main.js b/src/main.js @@ -60,6 +60,9 @@ const registerPushNotifications = store => { if (isUserMutation && vapidPublicKey && permission) { return store.dispatch('registerPushNotifications') } + if (data['nsfwCensorImage']) { + store.dispatch('setOption', { name: 'nsfwCensorImage', value: data['nsfwCensorImage'] }) + } const user = state.users.currentUser const isVapidMutation = mutation.type === 'setInstanceOption' && mutation.payload.name === 'vapidPublicKey'