mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-22 12:49:21 +02:00
Add mutes list
This commit is contained in:
parent
da22d19fb4
commit
0df863ac40
|
@ -517,6 +517,18 @@ func (svc *service) ServeUserPage(c *model.Client, id string, pageType string,
|
||||||
nextLink = fmt.Sprintf("/user/%s/bookmarks?max_id=%s",
|
nextLink = fmt.Sprintf("/user/%s/bookmarks?max_id=%s",
|
||||||
id, pg.MaxID)
|
id, pg.MaxID)
|
||||||
}
|
}
|
||||||
|
case "mutes":
|
||||||
|
if !isCurrent {
|
||||||
|
return errInvalidArgument
|
||||||
|
}
|
||||||
|
users, err = c.GetMutes(ctx, &pg)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if len(users) == 20 && len(pg.MaxID) > 0 {
|
||||||
|
nextLink = fmt.Sprintf("/user/%s/mutes?max_id=%s",
|
||||||
|
id, pg.MaxID)
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return errInvalidArgument
|
return errInvalidArgument
|
||||||
}
|
}
|
||||||
|
|
|
@ -99,7 +99,8 @@
|
||||||
</div>
|
</div>
|
||||||
{{if .IsCurrent}}
|
{{if .IsCurrent}}
|
||||||
<div>
|
<div>
|
||||||
<a href="/user/{{.User.ID}}/bookmarks"> bookmarks </a>
|
<a href="/user/{{.User.ID}}/bookmarks"> bookmarks </a> -
|
||||||
|
<a href="/user/{{.User.ID}}/mutes"> mutes </a>
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
<div>
|
<div>
|
||||||
|
@ -143,6 +144,10 @@
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="no-data-found">No data found</div>
|
<div class="no-data-found">No data found</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
{{else if eq .Type "mutes"}}
|
||||||
|
<div class="page-title"> Mutes </div>
|
||||||
|
{{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
<div class="pagination">
|
<div class="pagination">
|
||||||
|
|
Loading…
Reference in New Issue