This commit is contained in:
Vanessa 2023-09-16 19:32:00 +08:00
parent 45dfa62840
commit dc92bfdc8f

View file

@ -0,0 +1,9 @@
import {App} from "../index";
import {getCurrentWindow} from "@electron/remote";
export const closeWindow = async (app: App) => {
for (let i = 0; i < app.plugins.length; i++) {
await app.plugins[i].onunload();
}
getCurrentWindow().destroy();
}