mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
59aae7c87b
commit
4db338c1b0
3 changed files with 276 additions and 39 deletions
|
|
@ -4,7 +4,7 @@ import {openSetting} from "../config";
|
||||||
/// #if !BROWSER
|
/// #if !BROWSER
|
||||||
import {getCurrentWindow} from "@electron/remote";
|
import {getCurrentWindow} from "@electron/remote";
|
||||||
/// #endif
|
/// #endif
|
||||||
import {getDockByType} from "../layout/util";
|
import {exportLayout, getDockByType} from "../layout/util";
|
||||||
import {fetchPost} from "../util/fetch";
|
import {fetchPost} from "../util/fetch";
|
||||||
import {getAllDocks} from "../layout/getAll";
|
import {getAllDocks} from "../layout/getAll";
|
||||||
import {hasClosestByClassName} from "../protyle/util/hasClosest";
|
import {hasClosestByClassName} from "../protyle/util/hasClosest";
|
||||||
|
|
@ -54,7 +54,9 @@ export const initToolbarMore = () => {
|
||||||
label: window.siyuan.languages.lockScreen,
|
label: window.siyuan.languages.lockScreen,
|
||||||
click: () => {
|
click: () => {
|
||||||
fetchPost("/api/system/logoutAuth", {}, () => {
|
fetchPost("/api/system/logoutAuth", {}, () => {
|
||||||
|
exportLayout(false, () => {
|
||||||
window.location.href = "/";
|
window.location.href = "/";
|
||||||
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ import {
|
||||||
import {newFile} from "./newFile";
|
import {newFile} from "./newFile";
|
||||||
import {Constants} from "../constants";
|
import {Constants} from "../constants";
|
||||||
import {openSetting} from "../config";
|
import {openSetting} from "../config";
|
||||||
import {getDockByType, getInstanceById, setPanelFocus} from "../layout/util";
|
import {exportLayout, getDockByType, getInstanceById, setPanelFocus} from "../layout/util";
|
||||||
import {Tab} from "../layout/Tab";
|
import {Tab} from "../layout/Tab";
|
||||||
import {Editor} from "../editor";
|
import {Editor} from "../editor";
|
||||||
import {setEditMode} from "../protyle/util/setEditMode";
|
import {setEditMode} from "../protyle/util/setEditMode";
|
||||||
|
|
@ -248,7 +248,9 @@ export const globalShortcut = () => {
|
||||||
}
|
}
|
||||||
if (matchHotKey(window.siyuan.config.keymap.general.lockScreen.custom, event)) {
|
if (matchHotKey(window.siyuan.config.keymap.general.lockScreen.custom, event)) {
|
||||||
fetchPost("/api/system/logoutAuth", {}, () => {
|
fetchPost("/api/system/logoutAuth", {}, () => {
|
||||||
|
exportLayout(false, () => {
|
||||||
window.location.href = "/";
|
window.location.href = "/";
|
||||||
|
})
|
||||||
});
|
});
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue