Skip to content
This repository has been archived by the owner on Apr 15, 2019. It is now read-only.

Commit

Permalink
Merge pull request #125 from LiskHQ/107_about-menu
Browse files Browse the repository at this point in the history
"About" menu item and dialog - Closes #107
  • Loading branch information
karmacoma authored Apr 24, 2017
2 parents 0a1396d + 7c71b00 commit f1578cf
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
23 changes: 23 additions & 0 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,35 @@ function createWindow() {
template.unshift({
label: name,
submenu: [
{
role: 'about',
label: 'About',
},
{
role: 'quit',
label: 'Quit',
},
],
});
} else {
template.push({
label: "Help",
submenu: [
{
label: 'About',
click: function (item, focusedWindow) {
if (focusedWindow) {
const options = {
buttons: ['OK'],
icon: `${__dirname}/assets/lisk.png`,
message: `Lisk Nano\nVersion ${app.getVersion()}\nCopyright © 2017 Lisk Foundation`,
}
electron.dialog.showMessageBox(focusedWindow, options, function () {})
}
}
}
]
});
}

const menu = Menu.buildFromTemplate(template);
Expand Down
5 changes: 1 addition & 4 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,5 @@
"version": "0.2.0",
"description": "Lisk Nano",
"main": "main.js",
"author":{
"name": "Ricardo Ferro",
"email": "[email protected]"
}
"author": "Lisk Foundation <[email protected]>, lightcurve GmbH <[email protected]>"
}

0 comments on commit f1578cf

Please sign in to comment.