mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-28 09:21:13 -05:00
Make dashboard newsfeed list length a configurable item (#12469)
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
This commit is contained in:
parent
73b155d5f2
commit
22c952ac7a
4 changed files with 7 additions and 2 deletions
|
@ -164,6 +164,8 @@ EXPLORE_PAGING_NUM = 20
|
|||
ISSUE_PAGING_NUM = 10
|
||||
; Number of maximum commits displayed in one activity feed
|
||||
FEED_MAX_COMMIT_NUM = 5
|
||||
; Number of items that are displayed in home feed
|
||||
FEED_PAGING_NUM = 20
|
||||
; Number of maximum commits displayed in commit graph.
|
||||
GRAPH_MAX_COMMIT_NUM = 100
|
||||
; Number of line of codes shown for a code comment
|
||||
|
|
|
@ -127,6 +127,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
|
|||
- `ISSUE_PAGING_NUM`: **10**: Number of issues that are shown in one page (for all pages that list issues).
|
||||
- `MEMBERS_PAGING_NUM`: **20**: Number of members that are shown in organization members.
|
||||
- `FEED_MAX_COMMIT_NUM`: **5**: Number of maximum commits shown in one activity feed.
|
||||
- `FEED_PAGING_NUM`: **20**: Number of items that are displayed in home feed.
|
||||
- `GRAPH_MAX_COMMIT_NUM`: **100**: Number of maximum commits shown in the commit graph.
|
||||
- `DEFAULT_THEME`: **gitea**: \[gitea, arc-green\]: Set the default theme for the Gitea install.
|
||||
- `THEMES`: **gitea,arc-green**: All available themes. Allow users select personalized themes
|
||||
|
|
|
@ -339,9 +339,9 @@ func GetFeeds(opts GetFeedsOptions) ([]*Action, error) {
|
|||
cond = cond.And(builder.Eq{"is_deleted": false})
|
||||
}
|
||||
|
||||
actions := make([]*Action, 0, 20)
|
||||
actions := make([]*Action, 0, setting.UI.FeedPagingNum)
|
||||
|
||||
if err := x.Limit(20).Desc("id").Where(cond).Find(&actions); err != nil {
|
||||
if err := x.Limit(setting.UI.FeedPagingNum).Desc("id").Where(cond).Find(&actions); err != nil {
|
||||
return nil, fmt.Errorf("Find: %v", err)
|
||||
}
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ var (
|
|||
RepoSearchPagingNum int
|
||||
MembersPagingNum int
|
||||
FeedMaxCommitNum int
|
||||
FeedPagingNum int
|
||||
GraphMaxCommitNum int
|
||||
CodeCommentLines int
|
||||
ReactionMaxUserNum int
|
||||
|
@ -207,6 +208,7 @@ var (
|
|||
RepoSearchPagingNum: 10,
|
||||
MembersPagingNum: 20,
|
||||
FeedMaxCommitNum: 5,
|
||||
FeedPagingNum: 20,
|
||||
GraphMaxCommitNum: 100,
|
||||
CodeCommentLines: 4,
|
||||
ReactionMaxUserNum: 10,
|
||||
|
|
Loading…
Reference in a new issue