From c8ca074f92ddd02362bbdb2114bb3ca02d996a64 Mon Sep 17 00:00:00 2001 From: Kiran Niranjan Date: Wed, 2 Aug 2017 16:17:30 +0530 Subject: [PATCH] Electron-47 1. Removed `electron-context-menu` from dependency 2. Added cld.node in app.asar.unpacked dir 3. Resolved conflicts --- installer/win/Symphony-x64.aip | 109 ++++++++++++++++++++++++++++++--- js/menus/contextMenu.js | 51 --------------- package.json | 2 +- 3 files changed, 101 insertions(+), 61 deletions(-) delete mode 100644 js/menus/contextMenu.js diff --git a/installer/win/Symphony-x64.aip b/installer/win/Symphony-x64.aip index 9eb07fb5..cb16940e 100644 --- a/installer/win/Symphony-x64.aip +++ b/installer/win/Symphony-x64.aip @@ -43,14 +43,18 @@ + + + + @@ -59,7 +63,7 @@ - + @@ -67,20 +71,64 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - + + + - + @@ -89,11 +137,51 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -103,6 +191,7 @@ + @@ -145,6 +234,7 @@ + @@ -168,8 +258,10 @@ + + @@ -189,7 +281,7 @@ - + @@ -468,5 +560,4 @@ - - + \ No newline at end of file diff --git a/js/menus/contextMenu.js b/js/menus/contextMenu.js deleted file mode 100644 index efd89b8a..00000000 --- a/js/menus/contextMenu.js +++ /dev/null @@ -1,51 +0,0 @@ -'use strict'; -var cm = require('electron-context-menu'); - -/** - * Creates & applies Right Click Context Menu based on - * electron-context-menu library o all windows. - * Unless activated on edittable field, Reload option is shown. - * Enabled Cut/Copy/Paste/Delete/Select all on text. - * Enabled Save Image on images - * Enabled Copy Link on href Link - * Inspect Element is not enabled. - */ -function contextMenu(browserWindow){ - cm({ - browserWindow, - - prepend: (params) => [ - { - role: 'reload', - enabled: params.isEditable === false, - visible: params.isEditable === false - }, - { - role: 'undo', - enabled: params.isEditable && params.editFlags.canUndu, - visible: params.isEditable - }, - { - role: 'redo', - enabled: params.isEditable && params.editFlags.canRedo, - visible: params.isEditable - } - ], - append: (params) => [ - { - role: 'delete', - enabled: params.isEditable && params.editFlags.canDelete, - visible: params.isEditable - }, - { - role: 'selectall', - enabled: params.isEditable && params.editFlags.canSelectAll, - visible: params.isEditable - } - ], - - showInspectElement: false - }); -} - -module.exports = contextMenu; \ No newline at end of file diff --git a/package.json b/package.json index 9ed9ad74..9cc57af8 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "transformIgnorePatterns": [] }, "build": { + "asarUnpack": ["node_modules/@paulcbetts/cld/build/Release/cld.node"], "files": [ "!coverage/*", "!installer/*", @@ -90,7 +91,6 @@ "appdirectory": "^0.1.0", "async": "^2.1.5", "auto-launch": "^5.0.1", - "electron-context-menu": "^0.8.0", "electron-dl": "^1.9.0", "electron-spellchecker": "^1.2.0", "electron-squirrel-startup": "^1.0.0",