mirror of
https://gitea.phreedom.club/localhost_frssoft/bloat.git
synced 2024-11-14 08:49:23 +02:00
Add likes list
This commit is contained in:
parent
59692b7155
commit
2b1c703b6c
|
@ -541,6 +541,18 @@ func (svc *service) ServeUserPage(c *model.Client, id string, pageType string,
|
||||||
nextLink = fmt.Sprintf("/user/%s/blocks?max_id=%s",
|
nextLink = fmt.Sprintf("/user/%s/blocks?max_id=%s",
|
||||||
id, pg.MaxID)
|
id, pg.MaxID)
|
||||||
}
|
}
|
||||||
|
case "likes":
|
||||||
|
if !isCurrent {
|
||||||
|
return errInvalidArgument
|
||||||
|
}
|
||||||
|
statuses, err = c.GetFavourites(ctx, &pg)
|
||||||
|
if err != nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if len(statuses) == 20 && len(pg.MaxID) > 0 {
|
||||||
|
nextLink = fmt.Sprintf("/user/%s/likes?max_id=%s",
|
||||||
|
id, pg.MaxID)
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
return errInvalidArgument
|
return errInvalidArgument
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,7 @@
|
||||||
{{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}}/likes"> likes </a> -
|
||||||
<a href="/user/{{.User.ID}}/mutes"> mutes </a> -
|
<a href="/user/{{.User.ID}}/mutes"> mutes </a> -
|
||||||
<a href="/user/{{.User.ID}}/blocks"> blocks </a>
|
<a href="/user/{{.User.ID}}/blocks"> blocks </a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -146,6 +147,14 @@
|
||||||
<div class="no-data-found">No data found</div>
|
<div class="no-data-found">No data found</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|
||||||
|
{{else if eq .Type "likes"}}
|
||||||
|
<div class="page-title"> Likes </div>
|
||||||
|
{{range .Statuses}}
|
||||||
|
{{template "status.tmpl" (WithContext . $.Ctx)}}
|
||||||
|
{{else}}
|
||||||
|
<div class="no-data-found">No data found</div>
|
||||||
|
{{end}}
|
||||||
|
|
||||||
{{else if eq .Type "mutes"}}
|
{{else if eq .Type "mutes"}}
|
||||||
<div class="page-title"> Mutes </div>
|
<div class="page-title"> Mutes </div>
|
||||||
{{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
|
{{template "userlist.tmpl" (WithContext .Users $.Ctx)}}
|
||||||
|
|
Loading…
Reference in New Issue