mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
This commit is contained in:
parent
45dfa62840
commit
dc92bfdc8f
1 changed files with 9 additions and 0 deletions
9
app/src/window/closeWin.ts
Normal file
9
app/src/window/closeWin.ts
Normal 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();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue