🐛 The authentication page after startup Alt+M fails https://github.com/siyuan-note/siyuan/issues/9575
This commit is contained in:
parent
f67061d6cf
commit
1556d6d6a9
1 changed files with 20 additions and 0 deletions
|
@ -317,6 +317,25 @@ func serveCheckAuth(c *gin.Context) {
|
|||
return
|
||||
}
|
||||
|
||||
keymapHideWindow := "⌥M"
|
||||
if nil != (*model.Conf.Keymap)["general"] {
|
||||
switch (*model.Conf.Keymap)["general"].(type) {
|
||||
case map[string]interface{}:
|
||||
keymapGeneral := (*model.Conf.Keymap)["general"].(map[string]interface{})
|
||||
if nil != keymapGeneral["toggleWin"] {
|
||||
switch keymapGeneral["toggleWin"].(type) {
|
||||
case map[string]interface{}:
|
||||
toggleWin := keymapGeneral["toggleWin"].(map[string]interface{})
|
||||
if nil != toggleWin["custom"] {
|
||||
keymapHideWindow = toggleWin["custom"].(string)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if "" == keymapHideWindow {
|
||||
keymapHideWindow = "⌥M"
|
||||
}
|
||||
}
|
||||
model := map[string]interface{}{
|
||||
"l0": model.Conf.Language(173),
|
||||
"l1": model.Conf.Language(174),
|
||||
|
@ -330,6 +349,7 @@ func serveCheckAuth(c *gin.Context) {
|
|||
"appearanceModeOS": model.Conf.Appearance.ModeOS,
|
||||
"workspace": filepath.Base(util.WorkspaceDir),
|
||||
"workspacePath": util.WorkspaceDir,
|
||||
"keymapHideWindow": keymapHideWindow,
|
||||
}
|
||||
buf := &bytes.Buffer{}
|
||||
if err = tpl.Execute(buf, model); nil != err {
|
||||
|
|
Loading…
Add table
Reference in a new issue