🎨 Support setting automatic sync interval https://github.com/siyuan-note/siyuan/issues/13448

This commit is contained in:
Daniel 2024-12-14 12:02:14 +08:00
parent 152fa6e6e0
commit 45a6f7e29d
No known key found for this signature in database
GPG key ID: 86211BA83DF03017
18 changed files with 100 additions and 12 deletions

View file

@ -21,6 +21,7 @@ type Sync struct {
Enabled bool `json:"enabled"` // 是否开启同步
Perception bool `json:"perception"` // 是否开启感知
Mode int `json:"mode"` // 同步模式0未设置为兼容已有配置initConf 函数中会转换为 11自动2手动 https://github.com/siyuan-note/siyuan/issues/50893完全手动 https://github.com/siyuan-note/siyuan/issues/7295
Interval int `json:"interval"` // 自动同步间隔,单位:秒
Synced int64 `json:"synced"` // 最近同步时间
Stat string `json:"stat"` // 最近同步统计信息
GenerateConflictDoc bool `json:"generateConflictDoc"` // 云端同步冲突时是否生成冲突文档
@ -37,6 +38,7 @@ func NewSync() *Sync {
Mode: 1,
GenerateConflictDoc: false,
Provider: ProviderSiYuan,
Interval: 30,
}
}