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

Add more menu items to Electron wrapper - Closes #134 #135

Merged
merged 7 commits into from
Apr 26, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 67 additions & 15 deletions app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,63 @@ function createWindow() {
},
],
},
{
label: 'View',
submenu: [
{
role: 'reload',
},
{
role: 'togglefullscreen',
}
],
},
{
label: 'Window',
submenu: [
{
role: 'minimize',
},
],
},
{
label: 'Help',
submenu: [
{
label: 'Lisk Website',
click: function () {
electron.shell.openExternal('https://lisk.io');
}
},
{
label: 'Lisk Chat',
click: function () {
electron.shell.openExternal('https://lisk.chat');
}
},
{
label: 'Lisk Forum',
click: function () {
electron.shell.openExternal('https://forum.lisk.io');
}
},
{
type: 'separator',
},
{
label: 'Report Issue...',
click: function () {
electron.shell.openExternal('https://github.com/LiskHQ/lisk-nano/issues/new');
}
},
{
label: 'What\'s New...',
click: function () {
electron.shell.openExternal('https://github.com/LiskHQ/lisk-nano/releases');
}
},
],
},
];

if (process.platform === 'darwin') {
Expand All @@ -60,23 +117,18 @@ function createWindow() {
],
});
} 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 () {})
}
template[template.length - 1].submenu.push({
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 () {})
}
]
}
});
}

Expand Down