From 3233cb9f54fc1a21bde8861c6f8d6157ca96c04f Mon Sep 17 00:00:00 2001 From: Vanessa Date: Sat, 11 Jun 2022 10:56:58 +0800 Subject: [PATCH] :bug: https://github.com/siyuan-note/siyuan/issues/5149 --- app/src/menus/toolbar.ts | 4 ++-- app/src/util/globalShortcut.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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 = "/"; }); });