diff options
author | r <r@freesoftwareextremist.com> | 2021-05-30 06:59:34 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2021-05-30 06:59:34 +0000 |
commit | 07978649f151fe2a9daa85441400215edf7d50fc (patch) | |
tree | aa1af4835f6e3f6d3c1a5f15431466c1a7d5c342 | |
parent | 045be151bd275d0913305dc2a22f9af3d866fd17 (diff) | |
download | bloat-07978649f151fe2a9daa85441400215edf7d50fc.tar.gz bloat-07978649f151fe2a9daa85441400215edf7d50fc.zip |
Fix retweet button for private/direct post
-rw-r--r-- | templates/status.tmpl | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/templates/status.tmpl b/templates/status.tmpl index 775631a..9109f4e 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -193,24 +193,19 @@ </a> </div> <div class="status-action"> - {{if or (eq .Visibility "private") (eq .Visibility "direct")}} - <a class="status-retweet" href="" title="this status cannot be retweeted"> - retweet - </a> - {{else}} {{$rt := "retweet"}} {{if .Reblogged}} {{$rt = "unretweet"}} {{end}} <form class="status-retweet" data-action="{{$rt}}" action="/{{$rt}}/{{.ID}}" method="post" target="_self"> <input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}"> <input type="hidden" name="referrer" value="{{$.Ctx.Referrer}}"> <input type="hidden" name="retweeted_by_id" value="{{.RetweetedByID}}"> - <input type="submit" value="{{$rt}}" class="btn-link"> + <input type="submit" value="{{$rt}}" class="btn-link" + {{if or (eq .Visibility "private") (eq .Visibility "direct")}}title="this status cannot be retweeted" disabled{{end}}> <a class="status-retweet-count" href="/retweetedby/{{.ID}}" title="click to see the the list"> {{if and (not $.Ctx.AntiDopamineMode) .ReblogsCount}} ({{DisplayInteractionCount .ReblogsCount}}) {{end}} </a> </form> - {{end}} </div> <div class="status-action"> {{$like := "like"}} {{if .Favourited}} {{$like = "unlike"}} {{end}} |