Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions templates/followers.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
{{/*###
Handler=/followers
TitleBar=Followers
MinPrivileges=3
MinPrivileges=7
KyutGrill=friends.jpg
*/}}
{{ define "tpl" }}
<div class="ui container">
<div class="ui two item bottom attached menu">
<a class="item" href="/friends">Friends</a>
<a class="item active" href="/followers">Followers</a>
</div>
<div class="ui segments">
<div class="ui segment">
{{ .T "On this page you can see all of your followers, and add new friends if you see fit." }}
Expand All @@ -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 }}
<div class="ui four column stackable grid">
{{ range .subs }}
Expand Down
7 changes: 7 additions & 0 deletions templates/friends.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
KyutGrill=friends.jpg
*/}}
{{ define "tpl" }}
{{ $isSupporter := has .Context.User.Privileges 4 }}
<div class="ui container">
{{ if $isSupporter }}
<div class="ui two item bottom attached menu">
<a class="item active" href="/friends">Friends</a>
<a class="item" href="/followers">Followers</a>
</div>
{{ end }}
<div class="ui segments">
<div class="ui segment">
{{ .T "On this page you can see all of your friends, and unfriend them as you see fit." }}
Expand Down