mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-27 17:34:06 +01:00
10 lines
265 B
TypeScript
10 lines
265 B
TypeScript
|
|
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();
|
||
|
|
}
|