diff --git a/docs/changelog.txt b/docs/changelog.txt index 41860e3..b721aa0 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -2,6 +2,8 @@ changelog === next ++ Much better omit images handling. + + Fix update activity. + A few API refinements and additions. diff --git a/views/honk.html b/views/honk.html index aa3ceae..50e8537 100644 --- a/views/honk.html +++ b/views/honk.html @@ -2,6 +2,7 @@ {{ $bonkcsrf := .BonkCSRF }} {{ $IsPreview := .IsPreview }} {{ $maplink := .MapLink }} +{{ $omitimages := .OmitImages }} {{ with .Honk }}
{{ if $bonkcsrf }} @@ -70,8 +71,12 @@ in reply to: {{ .RID }} {{ else if eq .Media "application/pdf" }}

Attachment: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} {{ else }} +{{ if $omitimages }} +

Image: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} +{{ else }}

{{ .Desc }} {{ end }} +{{ end }} {{ else }} {{ if .XID }}

External Attachment: {{ .Name }}{{ if not (eq .Desc .Name) }} {{ .Desc }}{{ end }} diff --git a/views/honkpage.html b/views/honkpage.html index 6d53c57..5e78234 100644 --- a/views/honkpage.html +++ b/views/honkpage.html @@ -35,8 +35,9 @@ servermsgs[curpagestate.name + ":" + curpagestate.arg] = "{{ .ServerMessage }}" {{ $IsPreview := .IsPreview }} {{ $MapLink := .MapLink }} {{ $Badonk := .User.Options.Reaction }} +{{ $OmitImages := .User.Options.OmitImages }} {{ range .Honks }} -{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk }} +{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk "OmitImages" $OmitImages }} {{ end }} diff --git a/web.go b/web.go index cc7c872..3ce13c6 100644 --- a/web.go +++ b/web.go @@ -59,9 +59,6 @@ func getuserstyle(u *login.UserInfo) template.CSS { if user.Options.SkinnyCSS { css += "main { max-width: 700px; }\n" } - if user.Options.OmitImages { - css += ".honk .noise img { display: none; }\n" - } return css }