mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
⏪ Revert Kernel API /api/ui/reloadUI adds mode parameter https://github.com/siyuan-note/siyuan/issues/15308
This commit is contained in:
parent
cd6b560de8
commit
de3fd436ec
2 changed files with 1 additions and 15 deletions
|
|
@ -69,15 +69,5 @@ func reloadUI(c *gin.Context) {
|
||||||
ret := gulu.Ret.NewResult()
|
ret := gulu.Ret.NewResult()
|
||||||
defer c.JSON(http.StatusOK, ret)
|
defer c.JSON(http.StatusOK, ret)
|
||||||
|
|
||||||
arg, ok := util.JsonArg(c, ret)
|
util.ReloadUI()
|
||||||
if !ok {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
modeArg := arg["mode"]
|
|
||||||
if nil != modeArg {
|
|
||||||
util.ReloadUIWithMode(modeArg.(string))
|
|
||||||
} else {
|
|
||||||
util.ReloadUI()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -148,10 +148,6 @@ func ReloadUI() {
|
||||||
BroadcastByType("main", "reloadui", 0, "", nil)
|
BroadcastByType("main", "reloadui", 0, "", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
func ReloadUIWithMode(mode string) {
|
|
||||||
BroadcastByType("main", "reloadui", 0, "", map[string]interface{}{"mode": mode})
|
|
||||||
}
|
|
||||||
|
|
||||||
func PushTxErr(msg string, code int, data interface{}) {
|
func PushTxErr(msg string, code int, data interface{}) {
|
||||||
BroadcastByType("main", "txerr", code, msg, data)
|
BroadcastByType("main", "txerr", code, msg, data)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue