Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: fix https://github.com/siyuan-note/siyuan/issues/7042

Vanessa8a5ca0548da5
diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts
index 5aa796a286..af20f6adfe 100644
--- a/app/src/dialog/processSystem.ts
+++ b/app/src/dialog/processSystem.ts
@@ -14,7 +14,9 @@ import {getWorkspaceName} from "../menus/workspace";
export const lockScreen = () => {
/// #if BROWSER
- fetchPost("/api/system/logoutAuth", {});
+ fetchPost("/api/system/logoutAuth", {}, () => {
+ window.location.href = "/";
+ });
/// #else
ipcRenderer.send(Constants.SIYUAN_LOCK_SCREEN);
/// #endif
diff --git a/app/src/util/onGetConfig.ts b/app/src/util/onGetConfig.ts
index 48f110b407..0da2fe22d7 100644
--- a/app/src/util/onGetConfig.ts
+++ b/app/src/util/onGetConfig.ts
@@ -348,7 +348,11 @@ const initWindow = () => {
});
});
ipcRenderer.on(Constants.SIYUAN_LOCK_SCREEN, () => {
- fetchPost("/api/system/logoutAuth", {});
+ exportLayout(false, () => {
+ fetchPost("/api/system/logoutAuth", {}, () => {
+ window.location.reload();
+ });
+ });
});
ipcRenderer.on(Constants.SIYUAN_SAVE_CLOSE, (event, close) => {
winOnClose(currentWindow, close);