Improved dashboard
This commit is contained in:
parent
e7d914f223
commit
8c631f4e26
@ -36,10 +36,7 @@ func dashboard(ctx *aero.Context) string {
|
|||||||
flow.Parallel(func() {
|
flow.Parallel(func() {
|
||||||
posts, err = arn.AllPostsSlice()
|
posts, err = arn.AllPostsSlice()
|
||||||
arn.SortPostsLatestFirst(posts)
|
arn.SortPostsLatestFirst(posts)
|
||||||
|
posts = arn.FilterPostsWithUniqueThreads(posts, maxPosts)
|
||||||
if len(posts) > maxPosts {
|
|
||||||
posts = posts[:maxPosts]
|
|
||||||
}
|
|
||||||
}, func() {
|
}, func() {
|
||||||
followIDList = user.Following
|
followIDList = user.Following
|
||||||
userList, err = arn.DB.GetMany("User", followIDList)
|
userList, err = arn.DB.GetMany("User", followIDList)
|
||||||
|
@ -15,7 +15,7 @@ component Dashboard(posts []*arn.Post, following []*arn.User)
|
|||||||
h3.widget-title Forums
|
h3.widget-title Forums
|
||||||
|
|
||||||
each post in posts
|
each post in posts
|
||||||
a.widget-element.ajax(href=post.Link())
|
a.widget-element.ajax(href=post.Thread().Link())
|
||||||
.widget-element-text
|
.widget-element-text
|
||||||
Icon(arn.GetForumIcon(post.Thread().Tags[0]))
|
Icon(arn.GetForumIcon(post.Thread().Tags[0]))
|
||||||
span= post.Thread().Title
|
span= post.Thread().Title
|
||||||
|
Loading…
Reference in New Issue
Block a user