feat: update print menu item

This commit is contained in:
Jocs 2018-02-23 12:56:45 +08:00
parent e4075cb98b
commit 309ece1e0c
2 changed files with 7 additions and 1 deletions

View File

@ -119,6 +119,10 @@ export const exportHTML = (win, withStyle) => {
win.webContents.send('AGANI::export', { type: withStyle ? 'styledHtml' : 'html' })
}
export const print = win => {
win.webContents.print({ silent: false, printBackground: false, deviceName: '' })
}
export const open = win => {
const filename = dialog.showOpenDialog(win, {
properties: [ 'openFile' ],

View File

@ -55,6 +55,8 @@ export default {
}, {
label: 'Print',
accelerator: 'CmdOrCtrl+P',
click: function () {}
click: function (menuItem, browserWindow) {
actions.print(browserWindow)
}
}]
}