configuration: add nsfwUseBlur setting

This commit is contained in:
Ariadne Conill 2019-09-26 23:06:14 +00:00
parent aadd36f3ec
commit e6abf4676d
4 changed files with 6 additions and 0 deletions

View File

@ -74,6 +74,9 @@ Enables [PushAPI](https://developer.mozilla.org/en-US/docs/Web/API/Push_API) - b
### `nsfwCensorImage`
Use custom image for NSFW'd images
### `nsfwUseBlur`
Use blur effect instead of placeholder image for NSFW images
### `showFeaturesPanel`
Show panel showcasing instance features/settings to logged-out visitors

View File

@ -75,6 +75,7 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
}
copyInstanceOption('nsfwCensorImage')
copyInstanceOption('nsfwUseBlur')
copyInstanceOption('background')
copyInstanceOption('hidePostStats')
copyInstanceOption('hideUserStats')

View File

@ -17,6 +17,7 @@ const Attachment = {
nsfwImage: this.$store.state.instance.nsfwCensorImage || nsfwImage,
hideNsfwLocal: this.$store.state.config.hideNsfw,
preloadImage: this.$store.state.config.preloadImage,
nsfwUseBlur: this.$store.state.instance.nsfwUseBlur,
loading: false,
img: fileTypeService.fileType(this.attachment.mimetype) === 'image' && document.createElement('img'),
modalOpen: false,

View File

@ -27,6 +27,7 @@ const defaultState = {
subjectLineBehavior: 'email',
postContentType: 'text/plain',
nsfwCensorImage: undefined,
nsfwUseBlur: false,
vapidPublicKey: undefined,
noAttachmentLinks: false,
showFeaturesPanel: true,