From f380371654dd81b258e5f37e50ffcf3764f117c1 Mon Sep 17 00:00:00 2001 From: r Date: Sat, 25 Apr 2020 09:35:18 +0000 Subject: Add option to hide attachments --- templates/settings.tmpl | 4 ++++ templates/status.tmpl | 23 ++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/settings.tmpl b/templates/settings.tmpl index 2773deb..d0710c3 100644 --- a/templates/settings.tmpl +++ b/templates/settings.tmpl @@ -21,6 +21,10 @@ +
+ + +
diff --git a/templates/status.tmpl b/templates/status.tmpl index ade9d25..6433b9c 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -75,31 +75,48 @@ {{end}}
{{range .MediaAttachments}} + {{if eq .Type "image"}} + {{if $.Ctx.HideAttachments}} + [image] + {{else}} status-image {{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
{{end}}
+ {{end}} + {{else if eq .Type "audio"}} + {{if $.Ctx.HideAttachments}} + [audio] + {{else}} + {{end}} + {{else if eq .Type "video"}} + {{if $.Ctx.HideAttachments}} + [video] + {{else}}
{{if (and $.Ctx.MaskNSFW $s.Sensitive)}}
{{end}}
+ {{end}} + {{else}} - attachment + [attachment] {{end}} + {{end}}
{{if .Poll}} -- cgit v1.2.3