This commit is contained in:
Vanessa 2023-10-08 23:41:10 +08:00
parent aa5acf39cf
commit f600cc1bde
4 changed files with 31 additions and 29 deletions

View file

@ -1,5 +1,6 @@
import {App} from "../index";
import {getCurrentWindow} from "@electron/remote";
import {Constants} from "../constants";
import { ipcRenderer } from "electron";
export const closeWindow = async (app: App) => {
for (let i = 0; i < app.plugins.length; i++) {
@ -9,5 +10,5 @@ export const closeWindow = async (app: App) => {
console.error(e);
}
}
getCurrentWindow().destroy();
ipcRenderer.send(Constants.SIYUAN_CMD, "destroy");
};