mirror of
https://github.com/go-gitea/gitea.git
synced 2024-12-04 14:46:57 -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
@ -164,6 +164,8 @@ EXPLORE_PAGING_NUM = 20
|
|||||||
ISSUE_PAGING_NUM = 10
|
ISSUE_PAGING_NUM = 10
|
||||||
; Number of maximum commits displayed in one activity feed
|
; Number of maximum commits displayed in one activity feed
|
||||||
FEED_MAX_COMMIT_NUM = 5
|
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.
|
; Number of maximum commits displayed in commit graph.
|
||||||
GRAPH_MAX_COMMIT_NUM = 100
|
GRAPH_MAX_COMMIT_NUM = 100
|
||||||
; Number of line of codes shown for a code comment
|
; 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).
|
- `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.
|
- `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_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.
|
- `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.
|
- `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
|
- `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})
|
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)
|
return nil, fmt.Errorf("Find: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,6 +166,7 @@ var (
|
|||||||
RepoSearchPagingNum int
|
RepoSearchPagingNum int
|
||||||
MembersPagingNum int
|
MembersPagingNum int
|
||||||
FeedMaxCommitNum int
|
FeedMaxCommitNum int
|
||||||
|
FeedPagingNum int
|
||||||
GraphMaxCommitNum int
|
GraphMaxCommitNum int
|
||||||
CodeCommentLines int
|
CodeCommentLines int
|
||||||
ReactionMaxUserNum int
|
ReactionMaxUserNum int
|
||||||
@ -207,6 +208,7 @@ var (
|
|||||||
RepoSearchPagingNum: 10,
|
RepoSearchPagingNum: 10,
|
||||||
MembersPagingNum: 20,
|
MembersPagingNum: 20,
|
||||||
FeedMaxCommitNum: 5,
|
FeedMaxCommitNum: 5,
|
||||||
|
FeedPagingNum: 20,
|
||||||
GraphMaxCommitNum: 100,
|
GraphMaxCommitNum: 100,
|
||||||
CodeCommentLines: 4,
|
CodeCommentLines: 4,
|
||||||
ReactionMaxUserNum: 10,
|
ReactionMaxUserNum: 10,
|
||||||
|
Loading…
Reference in New Issue
Block a user