Skip to content

Commit

Permalink
Add menu for copy/paste, about, help, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
Rik Smith-Unna committed Jul 3, 2017
1 parent 7e4ad48 commit 3c83cc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"debug": "^2.6.3",
"debug-menu": "^0.6.0",
"electron-debug": "^1.2.0",
"electron-default-menu": "^1.0.1",
"electron-log": "^2.0.0",
"electron-updater": "^2.4.2",
"end-of-stream": "^1.1.0",
Expand Down
7 changes: 5 additions & 2 deletions app/run.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { app, BrowserWindow, protocol } = require('electron')
const { app, BrowserWindow, protocol, shell, Menu } = require('electron')
const defaultMenu = require('electron-default-menu')

let main = null

Expand Down Expand Up @@ -40,7 +41,9 @@ app.on('ready', function () {
}
})

main.setMenu(null)
const menu = defaultMenu(app, shell)

Menu.setApplicationMenu(Menu.buildFromTemplate(menu))

main.loadURL(path.join('file://', __dirname, '/client/index.html'))

Expand Down

0 comments on commit 3c83cc0

Please sign in to comment.