🎨 Partially refresh the interface after data synchronization https://github.com/siyuan-note/siyuan/issues/8098

This commit is contained in:
Liang Ding 2023-04-25 15:34:46 +08:00
parent e0e40dbad2
commit bd2e2c78bc
No known key found for this signature in database
GPG key ID: 136F30F901A2231D
4 changed files with 33 additions and 11 deletions

View file

@ -182,7 +182,6 @@ func exportLog(c *gin.Context) {
}
}
var start = true // 是否是启动
func getConf(c *gin.Context) {
ret := gulu.Ret.NewResult()
defer c.JSON(http.StatusOK, ret)
@ -200,21 +199,21 @@ func getConf(c *gin.Context) {
ret.Data = map[string]interface{}{
"conf": maskedConf,
"start": start,
"start": !util.IsUILoaded,
}
if start {
start = false
if !util.IsUILoaded {
go func() {
util.WaitForUILoaded()
if model.Conf.Editor.ReadOnly {
// 编辑器启用只读模式时启动后提示用户 https://github.com/siyuan-note/siyuan/issues/7700
go func() {
time.Sleep(time.Second * 7)
if model.Conf.Editor.ReadOnly {
// 编辑器启用只读模式时启动后提示用户 https://github.com/siyuan-note/siyuan/issues/7700
time.Sleep(time.Second * 3)
if model.Conf.Editor.ReadOnly {
util.PushMsg(model.Conf.Language(197), 7000)
}
}()
}
}
}()
}
}