mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 15:10:12 +01:00
🎨 为桌面端添加 同步模式 选择 https://github.com/siyuan-note/siyuan/issues/5089
This commit is contained in:
parent
9635154e45
commit
b108480450
8 changed files with 61 additions and 0 deletions
|
|
@ -140,6 +140,25 @@ func setSyncEnable(c *gin.Context) {
|
|||
}
|
||||
}
|
||||
|
||||
func setSyncMode(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
||||
arg, ok := util.JsonArg(c, ret)
|
||||
if !ok {
|
||||
return
|
||||
}
|
||||
|
||||
mode := int(arg["mode"].(float64))
|
||||
err := model.SetSyncMode(mode)
|
||||
if nil != err {
|
||||
ret.Code = 1
|
||||
ret.Msg = err.Error()
|
||||
ret.Data = map[string]interface{}{"closeTimeout": 5000}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func setCloudSyncDir(c *gin.Context) {
|
||||
ret := gulu.Ret.NewResult()
|
||||
defer c.JSON(http.StatusOK, ret)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue