Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Vanessa 2024-10-21 10:17:35 +08:00
commit efb1bb999d
4 changed files with 25 additions and 22 deletions

File diff suppressed because one or more lines are too long

View file

@ -10,7 +10,7 @@ require (
github.com/88250/epub v0.0.0-20230830085737-c19055cd1f48
github.com/88250/go-humanize v0.0.0-20240424102817-4f78fac47ea7
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02
github.com/88250/lute v1.7.7-0.20241018092725-a6a8f3976fe7
github.com/88250/lute v1.7.7-0.20241020155135-9028c989d61e
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1
github.com/ClarkThan/ahocorasick v0.0.0-20231011042242-30d1ef1347f4

View file

@ -14,8 +14,8 @@ github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950 h1:Pa5hMiBceT
github.com/88250/go-sqlite3 v1.14.13-0.20231214121541-e7f54c482950/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02 h1:3e5+yobj655pTeKOYMbJrnc1mE51ZkbXIxquTYZuYCY=
github.com/88250/gulu v1.2.3-0.20240612035750-c9cf5f7a4d02/go.mod h1:MUfzyfmbPrRDZLqxc7aPrVYveatTHRfoUa5TynPS0i8=
github.com/88250/lute v1.7.7-0.20241018092725-a6a8f3976fe7 h1:e+C0PFFJd5EW2fefghuPzho+6Tx7GqWYNQ0To8bq1+w=
github.com/88250/lute v1.7.7-0.20241018092725-a6a8f3976fe7/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
github.com/88250/lute v1.7.7-0.20241020155135-9028c989d61e h1:Qru5UqQig60u3au9Zo2OSHcIKVzR2QFtGFEkldHW1as=
github.com/88250/lute v1.7.7-0.20241020155135-9028c989d61e/go.mod h1:VDAzL8b+oCh+e3NAlmwwLzC53ten0rZlS8NboB7ljtk=
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c h1:Dl/8S9iLyPMTElnWIBxmjaLiWrkI5P4a21ivwAn5pU0=
github.com/88250/pdfcpu v0.3.14-0.20230401044135-c7369a99720c/go.mod h1:S5YT38L/GCjVjmB4PB84PymA1qfopjEhfhTNQilLpv4=
github.com/88250/vitess-sqlparser v0.0.0-20210205111146-56a2ded2aba1 h1:48T899JQDwyyRu9yXHePYlPdHtpJfrJEUGBMH3SMBWY=

View file

@ -1521,10 +1521,6 @@ func processSyncMergeResult(exit, byHand bool, mergeResult *dejavu.MergeResult,
return
}
if needReloadFiletree {
util.PushReloadFiletree()
}
if exit { // 退出时同步不用推送事件
return
}
@ -1539,11 +1535,18 @@ func processSyncMergeResult(exit, byHand bool, mergeResult *dejavu.MergeResult,
box.Index()
}
}
if 0 < len(needUnindexBoxes) || 0 < len(needIndexBoxes) {
needReloadUI := 0 < len(needUnindexBoxes) || 0 < len(needIndexBoxes)
if needReloadUI {
util.ReloadUI()
}
upsertRootIDs, removeRootIDs := incReindex(upserts, removes)
needReloadFiletree = !needReloadUI && (needReloadFiletree || 0 < len(upsertRootIDs) || 0 < len(removeRootIDs))
if needReloadFiletree {
util.PushReloadFiletree()
}
go func() {
util.WaitForUILoaded()
@ -1951,23 +1954,23 @@ func buildCloudConf() (ret *cloud.Conf, err error) {
ret.Endpoint = util.GetCloudSyncServer()
case conf.ProviderS3:
ret.S3 = &cloud.ConfS3{
Endpoint: Conf.Sync.S3.Endpoint,
AccessKey: Conf.Sync.S3.AccessKey,
SecretKey: Conf.Sync.S3.SecretKey,
Bucket: Conf.Sync.S3.Bucket,
Region: Conf.Sync.S3.Region,
PathStyle: Conf.Sync.S3.PathStyle,
SkipTlsVerify: Conf.Sync.S3.SkipTlsVerify,
Timeout: Conf.Sync.S3.Timeout,
Endpoint: Conf.Sync.S3.Endpoint,
AccessKey: Conf.Sync.S3.AccessKey,
SecretKey: Conf.Sync.S3.SecretKey,
Bucket: Conf.Sync.S3.Bucket,
Region: Conf.Sync.S3.Region,
PathStyle: Conf.Sync.S3.PathStyle,
SkipTlsVerify: Conf.Sync.S3.SkipTlsVerify,
Timeout: Conf.Sync.S3.Timeout,
ConcurrentReqs: Conf.Sync.S3.ConcurrentReqs,
}
case conf.ProviderWebDAV:
ret.WebDAV = &cloud.ConfWebDAV{
Endpoint: Conf.Sync.WebDAV.Endpoint,
Username: Conf.Sync.WebDAV.Username,
Password: Conf.Sync.WebDAV.Password,
SkipTlsVerify: Conf.Sync.WebDAV.SkipTlsVerify,
Timeout: Conf.Sync.WebDAV.Timeout,
Endpoint: Conf.Sync.WebDAV.Endpoint,
Username: Conf.Sync.WebDAV.Username,
Password: Conf.Sync.WebDAV.Password,
SkipTlsVerify: Conf.Sync.WebDAV.SkipTlsVerify,
Timeout: Conf.Sync.WebDAV.Timeout,
ConcurrentReqs: Conf.Sync.WebDAV.ConcurrentReqs,
}
default: