mirror of
https://github.com/finos/SymphonyElectron.git
synced 2024-12-28 09:51:06 -06:00
Merge branch 'master' into electron-113
* master: Electron-114 - Added a condition to not include reload in context menu when clicked on links
This commit is contained in:
commit
8aa5f50459
@ -41,12 +41,23 @@ class SpellCheckHelper {
|
|||||||
* @returns menu
|
* @returns menu
|
||||||
*/
|
*/
|
||||||
static processMenu(menu) {
|
static processMenu(menu) {
|
||||||
menu.append(new MenuItem({ type: 'separator' }));
|
|
||||||
menu.append(new MenuItem({
|
let isLink = false;
|
||||||
role: 'reload',
|
menu.items.map((item) => {
|
||||||
accelerator: 'CmdOrCtrl+R',
|
if (item.label === 'Copy Link'){
|
||||||
label: 'Reload'
|
isLink = true;
|
||||||
}));
|
}
|
||||||
|
return item;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!isLink){
|
||||||
|
menu.append(new MenuItem({ type: 'separator' }));
|
||||||
|
menu.append(new MenuItem({
|
||||||
|
role: 'reload',
|
||||||
|
accelerator: 'CmdOrCtrl+R',
|
||||||
|
label: 'Reload'
|
||||||
|
}));
|
||||||
|
}
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user