From e411cadc07827a0e1a7e59b6f8c32cca434cf06f Mon Sep 17 00:00:00 2001 From: Aochi Date: Sat, 12 Oct 2024 13:20:59 +0200 Subject: [PATCH] add: followers tab to friends & reverse --- templates/followers.html | 7 +++++-- templates/friends.html | 7 +++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/templates/followers.html b/templates/followers.html index 85a1a541..ebe743c5 100755 --- a/templates/followers.html +++ b/templates/followers.html @@ -1,11 +1,15 @@ {{/*### Handler=/followers TitleBar=Followers -MinPrivileges=3 +MinPrivileges=7 KyutGrill=friends.jpg */}} {{ define "tpl" }}
+
{{ .T "On this page you can see all of your followers, and add new friends if you see fit." }} @@ -14,7 +18,6 @@ {{ $ := . }} {{ $page := or (atoint (.Gin.Query "p")) 1 }} {{ $followers := .Get "mitsuha/followers_friends?p=%d&l=40&sort=username,asc" $page }} - {{ with $followers }}
{{ range .subs }} diff --git a/templates/friends.html b/templates/friends.html index 43b101ba..8fbff4e3 100755 --- a/templates/friends.html +++ b/templates/friends.html @@ -5,7 +5,14 @@ KyutGrill=friends.jpg */}} {{ define "tpl" }} +{{ $isSupporter := has .Context.User.Privileges 4 }}
+ {{ if $isSupporter }} + + {{ end }}
{{ .T "On this page you can see all of your friends, and unfriend them as you see fit." }}