Hide help link if empty.
This commit is contained in:
@@ -202,21 +202,21 @@ function createTemplate(mainWindow, config, isDev) {
|
|||||||
}]
|
}]
|
||||||
};
|
};
|
||||||
template.push(windowMenu);
|
template.push(windowMenu);
|
||||||
|
var submenu = [];
|
||||||
template.push({
|
if (config.helpLink) {
|
||||||
label: '&Help',
|
submenu.push({
|
||||||
submenu: [{
|
|
||||||
label: 'Learn More...',
|
label: 'Learn More...',
|
||||||
click() {
|
click() {
|
||||||
electron.shell.openExternal(config.helpLink);
|
electron.shell.openExternal(config.helpLink);
|
||||||
}
|
}
|
||||||
}, {
|
});
|
||||||
type: 'separator'
|
submenu.push(separatorItem);
|
||||||
}, {
|
}
|
||||||
label: `Version ${electron.app.getVersion()}`,
|
submenu.push({
|
||||||
enabled: false
|
label: `Version ${electron.app.getVersion()}`,
|
||||||
}]
|
enabled: false
|
||||||
});
|
});
|
||||||
|
template.push({label: '&Help', submenu});
|
||||||
return template;
|
return template;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user