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

make nsfw censor image configurable

See merge request pleroma/pleroma-fe!243
This commit is contained in:
Shpuld Shpludson 2018-12-13 15:04:55 +00:00
commit aa7cff92aa
2 changed files with 4 additions and 1 deletions

View file

@ -11,7 +11,7 @@ const Attachment = {
], ],
data () { data () {
return { return {
nsfwImage, nsfwImage: this.$store.state.config.nsfwCensorImage || nsfwImage,
hideNsfwLocal: this.$store.state.config.hideNsfw, hideNsfwLocal: this.$store.state.config.hideNsfw,
preloadImage: this.$store.state.config.preloadImage, preloadImage: this.$store.state.config.preloadImage,
loopVideo: this.$store.state.config.loopVideo, loopVideo: this.$store.state.config.loopVideo,

View file

@ -60,6 +60,9 @@ const registerPushNotifications = store => {
if (isUserMutation && vapidPublicKey && permission) { if (isUserMutation && vapidPublicKey && permission) {
return store.dispatch('registerPushNotifications') return store.dispatch('registerPushNotifications')
} }
if (data['nsfwCensorImage']) {
store.dispatch('setOption', { name: 'nsfwCensorImage', value: data['nsfwCensorImage'] })
}
const user = state.users.currentUser const user = state.users.currentUser
const isVapidMutation = mutation.type === 'setInstanceOption' && mutation.payload.name === 'vapidPublicKey' const isVapidMutation = mutation.type === 'setInstanceOption' && mutation.payload.name === 'vapidPublicKey'