mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +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
|
||||
import {getCurrentWindow} from "@electron/remote";
|
||||
/// #endif
|
||||
import {getDockByType} from "../layout/util";
|
||||
import {exportLayout, getDockByType} from "../layout/util";
|
||||
import {fetchPost} from "../util/fetch";
|
||||
import {getAllDocks} from "../layout/getAll";
|
||||
import {hasClosestByClassName} from "../protyle/util/hasClosest";
|
||||
|
|
@ -54,7 +54,9 @@ export const initToolbarMore = () => {
|
|||
label: window.siyuan.languages.lockScreen,
|
||||
click: () => {
|
||||
fetchPost("/api/system/logoutAuth", {}, () => {
|
||||
window.location.href = "/";
|
||||
exportLayout(false, () => {
|
||||
window.location.href = "/";
|
||||
})
|
||||
});
|
||||
}
|
||||
}).element);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ import {
|
|||
import {newFile} from "./newFile";
|
||||
import {Constants} from "../constants";
|
||||
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 {Editor} from "../editor";
|
||||
import {setEditMode} from "../protyle/util/setEditMode";
|
||||
|
|
@ -248,7 +248,9 @@ export const globalShortcut = () => {
|
|||
}
|
||||
if (matchHotKey(window.siyuan.config.keymap.general.lockScreen.custom, event)) {
|
||||
fetchPost("/api/system/logoutAuth", {}, () => {
|
||||
window.location.href = "/";
|
||||
exportLayout(false, () => {
|
||||
window.location.href = "/";
|
||||
})
|
||||
});
|
||||
event.preventDefault();
|
||||
return;
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue