From 91f68ccfb391ee53bfc36f4877ca8d8f63c8faf2 Mon Sep 17 00:00:00 2001 From: r Date: Sat, 16 Jan 2021 09:10:02 +0000 Subject: Add follow request support --- templates/notification.tmpl | 29 +++++++++++++++++++++++++++++ templates/requestlist.tmpl | 34 ++++++++++++++++++++++++++++++++++ templates/user.tmpl | 13 +++++++++---- 3 files changed, 72 insertions(+), 4 deletions(-) create mode 100644 templates/requestlist.tmpl (limited to 'templates') diff --git a/templates/notification.tmpl b/templates/notification.tmpl index 3977aa7..5563425 100644 --- a/templates/notification.tmpl +++ b/templates/notification.tmpl @@ -38,6 +38,35 @@ + {{else if eq .Type "follow_request"}} +
+
+ + profile-avatar + +
+
+
+ {{EmojiFilter .Account.DisplayName .Account.Emojis}} + wants to follow you - + + +
+
+ @{{.Account.Acct}} +
+
+ + +
+ - +
+ + +
+
+
+ {{else if eq .Type "mention"}} {{template "status" (WithContext .Status $.Ctx)}} diff --git a/templates/requestlist.tmpl b/templates/requestlist.tmpl new file mode 100644 index 0000000..232b56d --- /dev/null +++ b/templates/requestlist.tmpl @@ -0,0 +1,34 @@ +{{with .Data}} +
+ {{range .}} +
+
+ + avatar + +
+
+
+
{{EmojiFilter .DisplayName .Emojis}}
+ +
@{{.Acct}}
+
+
+
+ + +
+ - +
+ + +
+
+
+ {{else}} +
No data found
+ {{end}} +
+{{else}} +
No data found
+{{end}} diff --git a/templates/user.tmpl b/templates/user.tmpl index b3461c6..5ef411a 100644 --- a/templates/user.tmpl +++ b/templates/user.tmpl @@ -99,10 +99,11 @@ {{if .IsCurrent}}
- bookmarks - - likes - - mutes - - blocks + bookmarks + - likes + - mutes + - blocks + {{if .User.Locked}}- requests {{end}}
{{end}}
@@ -162,6 +163,10 @@ {{else if eq .Type "blocks"}}
Blocks
{{template "userlist.tmpl" (WithContext .Users $.Ctx)}} + +{{else if eq .Type "requests"}} +
Follow requests
+{{template "requestlist.tmpl" (WithContext .Users $.Ctx)}} {{end}}