mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-17 23:20:13 +01:00
This commit is contained in:
parent
15cce2c0a3
commit
7199b5b193
2 changed files with 12 additions and 9 deletions
|
|
@ -662,7 +662,7 @@ app.whenReady().then(() => {
|
||||||
BrowserWindow.fromId(data.id).webContents.send('siyuan-export-pdf', data)
|
BrowserWindow.fromId(data.id).webContents.send('siyuan-export-pdf', data)
|
||||||
})
|
})
|
||||||
ipcMain.on('siyuan-export-close', (event, id) => {
|
ipcMain.on('siyuan-export-close', (event, id) => {
|
||||||
BrowserWindow.fromId(id).webContents.send('siyuan-export-close', data)
|
BrowserWindow.fromId(id).webContents.send('siyuan-export-close', id)
|
||||||
})
|
})
|
||||||
ipcMain.on('siyuan-quit', (event, id) => {
|
ipcMain.on('siyuan-quit', (event, id) => {
|
||||||
const mainWindow = BrowserWindow.fromId(id)
|
const mainWindow = BrowserWindow.fromId(id)
|
||||||
|
|
@ -771,12 +771,14 @@ app.whenReady().then(() => {
|
||||||
mainWindow.show()
|
mainWindow.show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
workspaces.find(item => {
|
if ('win32' === process.platform || 'linux' === process.platform) {
|
||||||
if (item.id === data.id) {
|
workspaces.find(item => {
|
||||||
resetTrayMenu(item.tray, data.languages, mainWindow)
|
if (item.id === data.id) {
|
||||||
return true
|
resetTrayMenu(item.tray, data.languages, mainWindow)
|
||||||
}
|
return true
|
||||||
})
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -414,14 +414,15 @@ const renderPDF = (id: string) => {
|
||||||
actionElement.querySelector("#landscape").addEventListener('change', () => {
|
actionElement.querySelector("#landscape").addEventListener('change', () => {
|
||||||
setPadding();
|
setPadding();
|
||||||
});
|
});
|
||||||
|
const currentWindowId = ${getCurrentWindow().id};
|
||||||
actionElement.querySelector('.b3-button--cancel').addEventListener('click', () => {
|
actionElement.querySelector('.b3-button--cancel').addEventListener('click', () => {
|
||||||
const {ipcRenderer} = require("electron");
|
const {ipcRenderer} = require("electron");
|
||||||
ipcRenderer.send("${Constants.SIYUAN_EXPORT_CLOSE}", getCurrentWindow().id)
|
ipcRenderer.send("${Constants.SIYUAN_EXPORT_CLOSE}", currentWindowId)
|
||||||
});
|
});
|
||||||
actionElement.querySelector('.b3-button--text').addEventListener('click', () => {
|
actionElement.querySelector('.b3-button--text').addEventListener('click', () => {
|
||||||
const {ipcRenderer} = require("electron");
|
const {ipcRenderer} = require("electron");
|
||||||
ipcRenderer.send("${Constants.SIYUAN_EXPORT_PDF}", {
|
ipcRenderer.send("${Constants.SIYUAN_EXPORT_PDF}", {
|
||||||
id: getCurrentWindow().id,
|
id: currentWindowId,
|
||||||
pdfOptions:{
|
pdfOptions:{
|
||||||
printBackground: true,
|
printBackground: true,
|
||||||
landscape: actionElement.querySelector("#landscape").checked,
|
landscape: actionElement.querySelector("#landscape").checked,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue