diff --git a/docs/CONFIGURATION.md b/docs/CONFIGURATION.md index a7dcd915..6f935868 100644 --- a/docs/CONFIGURATION.md +++ b/docs/CONFIGURATION.md @@ -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 diff --git a/src/boot/after_store.js b/src/boot/after_store.js index 490ac4d0..ca97e4df 100644 --- a/src/boot/after_store.js +++ b/src/boot/after_store.js @@ -75,6 +75,7 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => { } copyInstanceOption('nsfwCensorImage') + copyInstanceOption('nsfwUseBlur') copyInstanceOption('background') copyInstanceOption('hidePostStats') copyInstanceOption('hideUserStats') diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index e93921fe..2e7d42d8 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -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, diff --git a/src/modules/instance.js b/src/modules/instance.js index 7d602aa1..a441ef53 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -27,6 +27,7 @@ const defaultState = { subjectLineBehavior: 'email', postContentType: 'text/plain', nsfwCensorImage: undefined, + nsfwUseBlur: false, vapidPublicKey: undefined, noAttachmentLinks: false, showFeaturesPanel: true,