This commit is contained in:
Liang Ding 2022-12-14 22:55:23 +08:00
parent f2b2806d9d
commit 24dbb7c092
No known key found for this signature in database
GPG key ID: 136F30F901A2231D

View file

@ -76,7 +76,7 @@ func GetRepoSnapshots(page int) (ret []*Snapshot, pageCount, totalCount int, err
return
}
logs, pageCount, totalCount, err := repo.GetIndexLogs(page, 16)
logs, pageCount, totalCount, err := repo.GetIndexLogs(page, 32)
if nil != err {
if dejavu.ErrNotFoundIndex == err {
logs = []*dejavu.Log{}
@ -98,6 +98,7 @@ func GetRepoSnapshots(page int) (ret []*Snapshot, pageCount, totalCount int, err
func buildSnapshots(logs []*dejavu.Log) (ret []*Snapshot) {
for _, l := range logs {
typesCount := statTypesByPath(l.Files)
l.Files = nil // 置空,否则返回前端数据量太大
ret = append(ret, &Snapshot{
Log: l,
TypesCount: typesCount,
@ -936,7 +937,7 @@ func subscribeEvents() {
indexWalkDataCount := 0
eventbus.Subscribe(eventbus.EvtIndexWalkData, func(context map[string]interface{}, path string) {
msg := fmt.Sprintf(Conf.Language(158), filepath.Base(path))
if 0 == indexWalkDataCount%512 {
if 0 == indexWalkDataCount%1024 {
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
}
@ -950,7 +951,7 @@ func subscribeEvents() {
getLatestFileCount := 0
eventbus.Subscribe(eventbus.EvtIndexGetLatestFile, func(context map[string]interface{}, id string) {
msg := fmt.Sprintf(Conf.Language(159), id[:7])
if 0 == getLatestFileCount%512 {
if 0 == getLatestFileCount%1024 {
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
}
@ -979,7 +980,7 @@ func subscribeEvents() {
coWalkDataCount := 0
eventbus.Subscribe(eventbus.EvtCheckoutWalkData, func(context map[string]interface{}, path string) {
msg := fmt.Sprintf(Conf.Language(161), filepath.Base(path))
if 0 == coWalkDataCount%512 {
if 0 == coWalkDataCount%1024 {
util.SetBootDetails(msg)
util.ContextPushMsg(context, msg)
}
@ -1011,7 +1012,7 @@ func subscribeEvents() {
eventbus.Subscribe(eventbus.EvtCheckoutRemoveFile, func(context map[string]interface{}, path string) {
msg := fmt.Sprintf(Conf.Language(163), filepath.Base(path))
util.IncBootProgress(bootProgressPart, msg)
if 0 == coRemoveFileCount%512 {
if 0 == coRemoveFileCount%1024 {
util.ContextPushMsg(context, msg)
}
coRemoveFileCount++