From 6c51a0ff8fa0c45171c2c311876a780ce034755f Mon Sep 17 00:00:00 2001 From: AkiraFukushima Date: Wed, 30 May 2018 20:54:21 +0900 Subject: [PATCH] refs #350 Set context menu --- package-lock.json | 77 ++++++++++++++++++++++++++++++++++++++++++++--- package.json | 1 + src/main/index.js | 6 ++++ 3 files changed, 79 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7e38ad27..871ce9db 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4969,6 +4969,22 @@ } } }, + "electron-context-menu": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/electron-context-menu/-/electron-context-menu-0.9.1.tgz", + "integrity": "sha1-7U3yDAgEkcPJlqv8s2MVmUajgFg=", + "requires": { + "electron-dl": "1.12.0", + "electron-is-dev": "0.1.2" + }, + "dependencies": { + "electron-is-dev": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/electron-is-dev/-/electron-is-dev-0.1.2.tgz", + "integrity": "sha1-ihBD4ys6HaHD9VPc4oznZCRhZ+M=" + } + } + }, "electron-debug": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/electron-debug/-/electron-debug-1.5.0.tgz", @@ -4991,6 +5007,16 @@ "semver": "5.5.0" } }, + "electron-dl": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-1.12.0.tgz", + "integrity": "sha512-UMc2CL45Ybpvu66LDPYzwmDRmYK4Ivz+wdnTM0eXcNMztvQwhixAk2UPme1c7McqG8bAlKEkQpZn3epmQy4EWg==", + "requires": { + "ext-name": "5.0.0", + "pupa": "1.0.0", + "unused-filename": "1.0.0" + } + }, "electron-download": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-3.3.0.tgz", @@ -6204,6 +6230,23 @@ } } }, + "ext-list": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/ext-list/-/ext-list-2.2.2.tgz", + "integrity": "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA==", + "requires": { + "mime-db": "1.33.0" + } + }, + "ext-name": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ext-name/-/ext-name-5.0.0.tgz", + "integrity": "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ==", + "requires": { + "ext-list": "2.2.2", + "sort-keys-length": "1.0.1" + } + }, "extend": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", @@ -9000,8 +9043,7 @@ "is-plain-obj": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", - "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", - "dev": true + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=" }, "is-plain-object": { "version": "2.0.4", @@ -10957,6 +10999,11 @@ } } }, + "modify-filename": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/modify-filename/-/modify-filename-1.1.0.tgz", + "integrity": "sha1-mi3sg4Bvuy2XXyK+7IWcoms5OqE=" + }, "moment": { "version": "2.21.0", "resolved": "https://registry.npmjs.org/moment/-/moment-2.21.0.tgz", @@ -12329,8 +12376,7 @@ "path-exists": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "path-is-absolute": { "version": "1.0.1", @@ -13298,6 +13344,11 @@ "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" }, + "pupa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/pupa/-/pupa-1.0.0.tgz", + "integrity": "sha1-mpVopa9+ZXuEYqbp1TKHQ1YM7/Y=" + }, "q": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", @@ -14958,11 +15009,18 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", "integrity": "sha1-RBttTTRnmPG05J6JIK37oOVD+a0=", - "dev": true, "requires": { "is-plain-obj": "1.1.0" } }, + "sort-keys-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz", + "integrity": "sha1-nLb09OnkgVWmqgZx7dM2/xR5oYg=", + "requires": { + "sort-keys": "1.1.2" + } + }, "source-list-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/source-list-map/-/source-list-map-2.0.0.tgz", @@ -16098,6 +16156,15 @@ } } }, + "unused-filename": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unused-filename/-/unused-filename-1.0.0.tgz", + "integrity": "sha1-00CID3GuIRXrqhMlvvBcxmhEacY=", + "requires": { + "modify-filename": "1.1.0", + "path-exists": "3.0.0" + } + }, "unzip-response": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unzip-response/-/unzip-response-2.0.1.tgz", diff --git a/package.json b/package.json index 23ffaf53..a35953d9 100644 --- a/package.json +++ b/package.json @@ -88,6 +88,7 @@ "axios": "^0.18.0", "boom": "^7.2.0", "deep-extend": "^0.5.1", + "electron-context-menu": "^0.9.1", "electron-json-storage": "^4.0.2", "electron-log": "^2.2.14", "electron-window-state": "^4.1.1", diff --git a/src/main/index.js b/src/main/index.js index 9115145c..766585f2 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -13,6 +13,12 @@ import Authentication from './auth' import Account from './account' import Streaming from './streaming' import Preferences from './preferences' +import ContextMenu from 'electron-context-menu' + +/** + * Context menu + */ +ContextMenu() /** * Set log level