mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
2b62c9612d
commit
eca0196bea
3 changed files with 16 additions and 4 deletions
|
|
@ -723,6 +723,12 @@ app.whenReady().then(() => {
|
|||
win.webContents.userAgent = "SiYuan/" + appVer + " https://b3log.org/siyuan Electron " + win.webContents.userAgent;
|
||||
win.webContents.session.setSpellCheckerLanguages(["en-US"]);
|
||||
win.loadURL(data.url);
|
||||
win.on("close", (event) => {
|
||||
if (win && !win.isDestroyed()) {
|
||||
win.webContents.send("siyuan-save-close");
|
||||
}
|
||||
event.preventDefault();
|
||||
});
|
||||
const targetScreen = screen.getDisplayNearestPoint(screen.getCursorScreenPoint());
|
||||
if (mainScreen.id !== targetScreen.id) {
|
||||
win.setBounds(targetScreen.workArea);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue