mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-30 05:18:49 +01:00
14 lines
396 B
TypeScript
14 lines
396 B
TypeScript
import {App} from "../index";
|
|
import {Constants} from "../constants";
|
|
import { ipcRenderer } from "electron";
|
|
|
|
export const closeWindow = async (app: App) => {
|
|
for (let i = 0; i < app.plugins.length; i++) {
|
|
try {
|
|
await app.plugins[i].onunload();
|
|
} catch (e) {
|
|
console.error(e);
|
|
}
|
|
}
|
|
ipcRenderer.send(Constants.SIYUAN_CMD, "destroy");
|
|
};
|