mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
This commit is contained in:
parent
2b62c9612d
commit
eca0196bea
3 changed files with 16 additions and 4 deletions
|
|
@ -28,6 +28,7 @@ import {getIdFromSYProtocol, isSYProtocol} from "../util/pathName";
|
|||
import {App} from "../index";
|
||||
import {initWindowEvent} from "./globalEvent/event";
|
||||
import {sendGlobalShortcut} from "./globalEvent/keydown";
|
||||
import {closeWindow} from "../window/closeWin";
|
||||
|
||||
const matchKeymap = (keymap: Record<string, IKeymapItem>, key1: "general" | "editor", key2?: "general" | "insert" | "heading" | "list" | "table") => {
|
||||
if (key1 === "general") {
|
||||
|
|
@ -297,10 +298,14 @@ export const initWindow = (app: App) => {
|
|||
return;
|
||||
}
|
||||
});
|
||||
ipcRenderer.on(Constants.SIYUAN_SAVE_CLOSE, (event, close) => {
|
||||
winOnClose(currentWindow, close);
|
||||
});
|
||||
}
|
||||
ipcRenderer.on(Constants.SIYUAN_SAVE_CLOSE, (event, close) => {
|
||||
if (isWindow()) {
|
||||
closeWindow(app);
|
||||
} else {
|
||||
winOnClose(currentWindow, close);
|
||||
}
|
||||
});
|
||||
ipcRenderer.on(Constants.SIYUAN_SEND_WINDOWS, (e, ipcData: IWebSocketData) => {
|
||||
onWindowsMsg(ipcData);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue