diff --git a/app/src/menus/toolbar.ts b/app/src/menus/toolbar.ts index fb8791b7e..8aea1ed50 100644 --- a/app/src/menus/toolbar.ts +++ b/app/src/menus/toolbar.ts @@ -53,8 +53,8 @@ export const initToolbarMore = () => { accelerator: window.siyuan.config.keymap.general.lockScreen.custom, label: window.siyuan.languages.lockScreen, click: () => { - fetchPost("/api/system/logoutAuth", {}, () => { - exportLayout(false, () => { + exportLayout(false, () => { + fetchPost("/api/system/logoutAuth", {}, () => { window.location.href = "/"; }); }); diff --git a/app/src/util/globalShortcut.ts b/app/src/util/globalShortcut.ts index 0dc79b66f..239cc291e 100644 --- a/app/src/util/globalShortcut.ts +++ b/app/src/util/globalShortcut.ts @@ -247,8 +247,8 @@ export const globalShortcut = () => { return; } if (matchHotKey(window.siyuan.config.keymap.general.lockScreen.custom, event)) { - fetchPost("/api/system/logoutAuth", {}, () => { - exportLayout(false, () => { + exportLayout(false, () => { + fetchPost("/api/system/logoutAuth", {}, () => { window.location.href = "/"; }); });