🎨 云端同步模式支持 完全手动同步 模式 https://github.com/siyuan-note/siyuan/issues/7295

This commit is contained in:
Liang Ding 2023-02-08 17:45:47 +08:00
parent dbce98d811
commit 7098a2c8b1
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
7 changed files with 271 additions and 272 deletions

View file

@ -57,7 +57,21 @@ func performSync(c *gin.Context) {
}
}
model.SyncData(false, false, true)
if 3 != model.Conf.Sync.Mode {
model.SyncData(false, false, true)
return
}
// 云端同步模式支持 `完全手动同步` 模式 https://github.com/siyuan-note/siyuan/issues/7295
upload := true
if uploadArg := arg["upload"]; nil != uploadArg {
upload = uploadArg.(bool)
}
if upload {
model.SyncDataUpload()
} else {
model.SyncDataDownload()
}
}
func performBootSync(c *gin.Context) {