mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
1165f4def2
commit
8a5ca0548d
2 changed files with 8 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue