Skip to content

Commit 7af3d0b

Browse files
IvanZoengkamranahmedse
authored andcommitted
add refresh hotkey
1 parent 354e5ca commit 7af3d0b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

public/menu.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,15 @@ function setMainMenu(mainWindow) {
126126
{ role: 'cut' },
127127
{ role: 'copy' },
128128
{ role: 'paste' },
129-
{ role: 'selectall' }
129+
{ role: 'selectall' },
130+
{ type: 'separator' },
131+
{
132+
label: 'Refresh',
133+
accelerator: 'CmdOrCtrl+R',
134+
click(menuItem) {
135+
mainWindow.webContents.send('webPage.reload');
136+
}
137+
}
130138
]
131139
},
132140
{

src/components/web-page/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class WebPage extends React.Component {
102102
bindNavBar() {
103103
ipcRenderer.on('nav.toggle', this.toggleNavBar);
104104
ipcRenderer.on('nav.show', this.showNavBar);
105+
ipcRenderer.on('webPage.reload', this.onReload)
105106
}
106107

107108
unbindNavBar() {

0 commit comments

Comments
 (0)