From 2678f33157d147ba548793709cd8fbaabb4eaae2 Mon Sep 17 00:00:00 2001 From: r Date: Sat, 21 Dec 2019 13:26:31 +0000 Subject: 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 --- templates/postform.tmpl | 20 +++++++++++++++----- templates/status.tmpl | 32 +++++++++++++++++++++++++------- templates/thread.tmpl | 4 ++-- templates/timeline.tmpl | 2 +- 4 files changed, 43 insertions(+), 15 deletions(-) (limited to 'templates') diff --git a/templates/postform.tmpl b/templates/postform.tmpl index 3f6eeaa..137232f 100644 --- a/templates/postform.tmpl +++ b/templates/postform.tmpl @@ -1,15 +1,25 @@
- {{if .}} - - + {{if .ReplyContext}} + + {{else}} {{end}}
- +
- Attachments + + +
+
+ +
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 @@ {{.Account.Acct}} + + {{if eq .Visibility "public"}} + + {{else if eq .Visibility "unlisted"}} + + {{else if eq .Visibility "private"}} + + {{else if eq .Visibility "direct"}} + + {{end}} + {{end}}
@@ -68,16 +79,23 @@ {{DisplayInteractionCount .RepliesCount}} - {{if .Reblogged}} - - - {{DisplayInteractionCount .ReblogsCount}} - - {{else}} - + {{if or (eq .Visibility "private") (eq .Visibility "direct")}} + {{DisplayInteractionCount .ReblogsCount}} + {{else}} + {{if .Reblogged}} + + + {{DisplayInteractionCount .ReblogsCount}} + + {{else}} + + + {{DisplayInteractionCount .ReblogsCount}} + + {{end}} {{end}} {{if .Favourited}} diff --git a/templates/thread.tmpl b/templates/thread.tmpl index 9d8f650..afb307b 100644 --- a/templates/thread.tmpl +++ b/templates/thread.tmpl @@ -5,8 +5,8 @@ {{range .Statuses}} {{template "status.tmpl" .}} -{{if $.ReplyContext}}{{if eq .ID $.ReplyContext.InReplyToID}} -{{template "postform.tmpl" $.ReplyContext}} +{{if $.PostContext.ReplyContext}}{{if eq .ID $.PostContext.ReplyContext.InReplyToID}} +{{template "postform.tmpl" $.PostContext}} {{end}}{{end}} {{end}} diff --git a/templates/timeline.tmpl b/templates/timeline.tmpl index 09717c1..6280e65 100644 --- a/templates/timeline.tmpl +++ b/templates/timeline.tmpl @@ -3,7 +3,7 @@
Timeline
-{{template "postform.tmpl" }} +{{template "postform.tmpl" .PostContext}} {{range .Statuses}} {{template "status.tmpl" .}} -- cgit v1.2.3