diff options
author | r <r@freesoftwareextremist.com> | 2019-12-21 13:26:31 +0000 |
---|---|---|
committer | r <r@freesoftwareextremist.com> | 2019-12-21 13:26:31 +0000 |
commit | 2678f33157d147ba548793709cd8fbaabb4eaae2 (patch) | |
tree | 37d4775452f68dc8a52f3156758dc3475feeda68 /templates/status.tmpl | |
parent | 3af4361927d65b896ac3f9e2f0170cbbef63c0c0 (diff) | |
download | bloat-2678f33157d147ba548793709cd8fbaabb4eaae2.tar.gz bloat-2678f33157d147ba548793709cd8fbaabb4eaae2.zip |
Add support for scopes
- Add scope selection for for new post
- Save new post scope in db
- Copy scope on reply
- Show scope icon on posts
Diffstat (limited to 'templates/status.tmpl')
-rw-r--r-- | templates/status.tmpl | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/templates/status.tmpl b/templates/status.tmpl index 0e6f0c0..a89fc78 100644 --- a/templates/status.tmpl +++ b/templates/status.tmpl @@ -26,6 +26,17 @@ <a href="/user/{{.Account.ID}}" > <span class="status-uname"> {{.Account.Acct}} </span> </a> + <a class="status-visibility" href="{{.URL}}" target="_blank"> + {{if eq .Visibility "public"}} + <span class="icon dripicons-web" title="Public"></span> + {{else if eq .Visibility "unlisted"}} + <span class="icon dripicons-lock-open" title="Unlisted"></span> + {{else if eq .Visibility "private"}} + <span class="icon dripicons-lock" title="Private"></span> + {{else if eq .Visibility "direct"}} + <span class="icon dripicons-mail" title="Direct"></span> + {{end}} + </a> </div> {{end}} <div class="status-reply-container"> @@ -68,16 +79,23 @@ <span class="icon dripicons-reply"></span> <span> {{DisplayInteractionCount .RepliesCount}} </span> </a> - {{if .Reblogged}} - <a class="status-retweet" href="/unretweet/{{.ID}}" title="undo repost"> - <span class="icon dripicons-retweet retweeted"></span> - <span> {{DisplayInteractionCount .ReblogsCount}} </span> - </a> - {{else}} - <a class="status-retweet" href="/retweet/{{.ID}}" title="repost"> + {{if or (eq .Visibility "private") (eq .Visibility "direct")}} + <a class="status-retweet" title="this status cannot be retweeted"> <span class="icon dripicons-retweet"></span> <span> {{DisplayInteractionCount .ReblogsCount}} </span> </a> + {{else}} + {{if .Reblogged}} + <a class="status-retweet" href="/unretweet/{{.ID}}" title="undo retweet"> + <span class="icon dripicons-retweet retweeted"></span> + <span> {{DisplayInteractionCount .ReblogsCount}} </span> + </a> + {{else}} + <a class="status-retweet" href="/retweet/{{.ID}}" title="retweet"> + <span class="icon dripicons-retweet"></span> + <span> {{DisplayInteractionCount .ReblogsCount}} </span> + </a> + {{end}} {{end}} {{if .Favourited}} <a class="status-like" href="/unlike/{{.ID}}" title="unlike"> |