mirror of
https://github.com/appdev/siyuan-unlock.git
synced 2026-03-11 11:18:27 +08:00
This commit is contained in:
parent
1165f4def2
commit
8a5ca0548d
@ -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…
Reference in New Issue
Block a user