Show attachment metadata when attachment preview is disabled

This commit is contained in:
r 2022-03-30 17:59:42 +00:00
parent 71238ab7bc
commit 94ff5c93de

View File

@ -103,7 +103,7 @@
{{if eq .Type "image"}} {{if eq .Type "image"}}
{{if $.Ctx.HideAttachments}} {{if $.Ctx.HideAttachments}}
<a href="{{.URL}}" target="_blank"> <a href="{{.URL}}" target="_blank">
{{if .Description}}[{{.Description}}]{{else}}[image]{{end}} [image{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}]
</a> </a>
{{else}} {{else}}
<a class="img-link" href="{{.URL}}" target="_blank" title="{{.Description}}"> <a class="img-link" href="{{.URL}}" target="_blank" title="{{.Description}}">
@ -117,7 +117,7 @@
{{else if eq .Type "audio"}} {{else if eq .Type "audio"}}
{{if $.Ctx.HideAttachments}} {{if $.Ctx.HideAttachments}}
<a href="{{.URL}}" target="_blank"> <a href="{{.URL}}" target="_blank">
{{if .Description}}[{{.Description}}]{{else}}[audio]{{end}} [audio{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}]
</a> </a>
{{else}} {{else}}
<audio class="status-audio" controls title="{{.Description}}"> <audio class="status-audio" controls title="{{.Description}}">
@ -129,7 +129,7 @@
{{else if eq .Type "video"}} {{else if eq .Type "video"}}
{{if $.Ctx.HideAttachments}} {{if $.Ctx.HideAttachments}}
<a href="{{.URL}}" target="_blank"> <a href="{{.URL}}" target="_blank">
{{if .Description}}[{{.Description}}]{{else}}[video]{{end}} [video{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}]
</a> </a>
{{else}} {{else}}
<div class="status-video-container" title="{{.Description}}"> <div class="status-video-container" title="{{.Description}}">
@ -145,7 +145,7 @@
{{else}} {{else}}
<a href="{{.URL}}" target="_blank"> <a href="{{.URL}}" target="_blank">
{{if .Description}}[{{.Description}}]{{else}}[attachment]{{end}} [attachment{{if $s.Sensitive}}/nsfw{{end}}{{if .Description}}: {{.Description}}{{end}}]
</a> </a>
{{end}} {{end}}
{{end}} {{end}}