Skip to content

Commit

Permalink
add refresh hotkey
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanZoeng authored and kamranahmedse committed Apr 27, 2019
1 parent 354e5ca commit 7af3d0b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
10 changes: 9 additions & 1 deletion public/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,15 @@ function setMainMenu(mainWindow) {
{ role: 'cut' },
{ role: 'copy' },
{ role: 'paste' },
{ role: 'selectall' }
{ role: 'selectall' },
{ type: 'separator' },
{
label: 'Refresh',
accelerator: 'CmdOrCtrl+R',
click(menuItem) {
mainWindow.webContents.send('webPage.reload');
}
}
]
},
{
Expand Down
1 change: 1 addition & 0 deletions src/components/web-page/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class WebPage extends React.Component {
bindNavBar() {
ipcRenderer.on('nav.toggle', this.toggleNavBar);
ipcRenderer.on('nav.show', this.showNavBar);
ipcRenderer.on('webPage.reload', this.onReload)
}

unbindNavBar() {
Expand Down

0 comments on commit 7af3d0b

Please sign in to comment.