don't show edit button for remote posts, from lnpr
Ted Unangst tedu@tedunangst.com
Mon, 20 Nov 2023 11:44:37 -0500
3 files changed,
8 insertions(+),
2 deletions(-)
M
views/honk.html
→
views/honk.html
@@ -126,7 +126,11 @@ <button disabled>untagged</button>
{{ else }} <button class="flogit-untag">untag me</button> {{ end }} +{{ if eq .Honk.Honker .UserURL }} <button><a href="/edit?xid={{ .Honk.XID }}">edit</a></button> +{{ else }} +<button disabled>nope</button> +{{ end }} {{ if not (eq .Badonk "none") }} {{ if .Honk.IsReacted }} <button disabled>badonked</button>
M
views/honkfrags.html
→
views/honkfrags.html
@@ -2,6 +2,7 @@ {{ $BonkCSRF := .HonkCSRF }}
{{ $MapLink := .MapLink }} {{ $Badonk := .User.Options.Reaction }} {{ $OmitImages := .User.Options.OmitImages }} +{{ $UserURL := .User.URL }} {{ range .Honks }} -{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "Badonk" $Badonk "OmitImages" $OmitImages }} +{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "Badonk" $Badonk "OmitImages" $OmitImages "UserURL" $UserURL }} {{ end }}
M
views/honkpage.html
→
views/honkpage.html
@@ -29,8 +29,9 @@ {{ $IsPreview := .IsPreview }}
{{ $MapLink := .MapLink }} {{ $Badonk := .User.Options.Reaction }} {{ $OmitImages := .User.Options.OmitImages }} +{{ $UserURL := .User.URL }} {{ range .Honks }} -{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk "OmitImages" $OmitImages }} +{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "IsPreview" $IsPreview "Badonk" $Badonk "OmitImages" $OmitImages "UserURL" $UserURL }} {{ end }} </div> </div>