Skip to content

Commit

Permalink
* fix refresh shortcut issue
Browse files Browse the repository at this point in the history
  • Loading branch information
huangruichang committed Mar 20, 2017
1 parent 9bafabf commit 7dfa370
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions app/src/helpers/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const createMenu = (app) => {
submenu: [
{
label: '重新加载',
accelerator: 'CmdOrCtrl+R',
click: () => {
BrowserWindow.getFocusedWindow().reload()
},
Expand Down
6 changes: 1 addition & 5 deletions app/src/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

import { app, BrowserWindow, nativeImage, Menu, globalShortcut } from 'electron'
import { app, BrowserWindow, nativeImage, Menu } from 'electron'
import { join, resolve } from 'path'
import createMenu from './helpers/menu'

Expand All @@ -19,10 +19,6 @@ app.on('ready', () => {

let menu = Menu.buildFromTemplate(createMenu(app))
Menu.setApplicationMenu(menu)

globalShortcut.register('CommandOrControl+R', () => {
BrowserWindow.getFocusedWindow().reload()
})
})

app.on('window-all-closed', () => {
Expand Down

0 comments on commit 7dfa370

Please sign in to comment.