Skip to content

Commit

Permalink
fix(menu): preference from menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanSalt committed Aug 25, 2020
1 parent 494b594 commit 6c41db0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main/lib/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ async function createApplicationMenu() {
label: translate('Preferences...#!menu.preference'),
accelerator: 'Command+,',
click(self, frame) {
frame.webContents.send('open-settings')
frame.webContents.send('invoke', 'open-settings')
},
},
{ type: 'separator' },
Expand Down
4 changes: 4 additions & 0 deletions renderer/components/app.vue
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ export default {
console.error(`Uncaught error in main process: ${error}`)
})
ipcRenderer.on('invoke', (event, command) => {
ipcRenderer.invoke(command)
})
ipcRenderer.on('open-tab', (event, args) => {
createTerminalTab(args)
})
Expand Down

0 comments on commit 6c41db0

Please sign in to comment.