Skip to content

Commit

Permalink
chore: add pagination settings
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Aug 27, 2022
1 parent 37eb3dd commit 74007a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions internal/bootstrap/data/setting.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ func InitialSettings() []model.SettingItem {
{Key: conf.BasePath, Value: "", Type: conf.TypeString, Group: model.SITE},
{Key: conf.SiteTitle, Value: "AList", Type: conf.TypeString, Group: model.SITE},
{Key: conf.Announcement, Value: "https://github.com/alist-org/alist", Type: conf.TypeString, Group: model.SITE},
{Key: "pagination_type", Value: "all", Type: conf.TypeSelect, Options: "all,pagination,load_more,auto_load_more", Group: model.SITE},
{Key: "default_page_size", Value: "30", Type: conf.TypeNumber, Group: model.SITE},
// style settings
{Key: conf.Logo, Value: "https://cdn.jsdelivr.net/gh/alist-org/logo@main/logo.svg", Type: conf.TypeString, Group: model.STYLE},
{Key: conf.Favicon, Value: "https://cdn.jsdelivr.net/gh/alist-org/logo@main/logo.svg", Type: conf.TypeString, Group: model.STYLE},
Expand Down
4 changes: 2 additions & 2 deletions server/common/req.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package common

type PageReq struct {
Page int `json:"page_index" form:"page"`
PerPage int `json:"page_size" form:"per_page"`
Page int `json:"page" form:"page"`
PerPage int `json:"per_page" form:"per_page"`
}

const MaxUint = ^uint(0)
Expand Down

0 comments on commit 74007a1

Please sign in to comment.