mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-24 02:20:13 +01:00
🎨 localStorage 支持在多界面实例间同步 https://github.com/siyuan-note/siyuan/issues/6965
This commit is contained in:
parent
3a1382cb42
commit
853ba5be3a
5 changed files with 38 additions and 10 deletions
|
|
@ -188,11 +188,16 @@ func setLocalStorage(c *gin.Context) {
|
|||
}
|
||||
|
||||
val := arg["val"].(interface{})
|
||||
|
||||
err := model.SetLocalStorage(val)
|
||||
if nil != err {
|
||||
ret.Code = -1
|
||||
ret.Msg = err.Error()
|
||||
return
|
||||
}
|
||||
|
||||
app := arg["app"].(string)
|
||||
evt := util.NewCmdResult("transactions", 0, util.PushModeBroadcastMainExcludeSelfApp, util.PushModeBroadcastMainExcludeSelfApp)
|
||||
evt.AppId = app
|
||||
evt.Data = val
|
||||
util.PushEvent(evt)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue