From 306b0fe3b3abeaa60fdb9f5a8e73b3cd6e936700 Mon Sep 17 00:00:00 2001 From: localhost_frssoft Date: Sun, 5 Nov 2023 17:46:14 +0300 Subject: [PATCH] NSFW content in spoiler --- README | 1 + templates/status.tmpl | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/README b/README index 1c54778..48e244a 100644 --- a/README +++ b/README @@ -12,6 +12,7 @@ Changes (localhost_custom fork): - visible edited post time - visible quoted post (status in status) - hide boosts in spoiler +- hide NSFW content and attachments in spoiler - some micro visual changes - some others changes no matter diff --git a/templates/status.tmpl b/templates/status.tmpl index c5a8f21..e6d3495 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -105,6 +105,7 @@
{{if .Sensitive}}[NSFW]
{{end}} {{- if .SpoilerText}}{{EmojiFilter (HTML .SpoilerText) .Emojis | Raw}}
{{end -}} + {{if .Sensitive}}
{{end}} {{- StatusContentFilter .Content .Emojis .Mentions | Raw -}} {{if .Pleroma.Quote}}
@@ -112,6 +113,7 @@ {{template "status" (WithContext .Pleroma.Quote $.Ctx)}}
{{end}} + {{if .Sensitive}}
{{end}}
{{end}} {{$st_id := .ID}} @@ -132,6 +134,7 @@ {{end}} {{if .MediaAttachments}} + {{if .Sensitive}}
NSFW attachments{{end}}
{{range .MediaAttachments}} @@ -185,6 +188,7 @@ {{end}} {{end}}
+ {{if .Sensitive}}
{{end}} {{end}} {{if .Poll}}