mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +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 = () => {
|
export const lockScreen = () => {
|
||||||
/// #if BROWSER
|
/// #if BROWSER
|
||||||
fetchPost("/api/system/logoutAuth", {});
|
fetchPost("/api/system/logoutAuth", {}, () => {
|
||||||
|
window.location.href = "/";
|
||||||
|
});
|
||||||
/// #else
|
/// #else
|
||||||
ipcRenderer.send(Constants.SIYUAN_LOCK_SCREEN);
|
ipcRenderer.send(Constants.SIYUAN_LOCK_SCREEN);
|
||||||
/// #endif
|
/// #endif
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,11 @@ const initWindow = () => {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
ipcRenderer.on(Constants.SIYUAN_LOCK_SCREEN, () => {
|
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) => {
|
ipcRenderer.on(Constants.SIYUAN_SAVE_CLOSE, (event, close) => {
|
||||||
winOnClose(currentWindow, close);
|
winOnClose(currentWindow, close);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue