From 572b3b876f1d1901b480b46def19da8e7a465761 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 20 Jan 2020 14:38:41 -0500 Subject: [PATCH] Adding nsfw image blur. Fixes #438 --- ui/assets/css/main.css | 7 +++++++ ui/src/components/post-listing.tsx | 30 ++++++++++++++---------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/ui/assets/css/main.css b/ui/assets/css/main.css index dcc55f19..2703d550 100644 --- a/ui/assets/css/main.css +++ b/ui/assets/css/main.css @@ -163,3 +163,10 @@ hr { flex: 1; } +.img-blur { + filter: blur(10px); + -webkit-filter: blur(10px); + -moz-filter: blur(10px); + -o-filter: blur(10px); + -ms-filter: blur(10px); +} diff --git a/ui/src/components/post-listing.tsx b/ui/src/components/post-listing.tsx index 0ffabf27..b1db2670 100644 --- a/ui/src/components/post-listing.tsx +++ b/ui/src/components/post-listing.tsx @@ -160,22 +160,20 @@ export class PostListing extends Component { )} - {post.url && - isImage(post.url) && - !post.nsfw && - !post.community_nsfw && - !this.state.imageExpanded && ( - - - - )} + {post.url && isImage(post.url) && !this.state.imageExpanded && ( + + + + )} {post.url && isVideo(post.url) && (