From 5163f82b34e6271f1dc27b552ec4016bdebe1925 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 3 May 2017 17:27:39 +0200 Subject: [PATCH] Add a context menu Fixes #21. Signed-off-by: Gergely Nagy --- main/index.ts | 2 ++ package.json | 1 + 2 files changed, 3 insertions(+) diff --git a/main/index.ts b/main/index.ts index e75fbe8..43d49e4 100644 --- a/main/index.ts +++ b/main/index.ts @@ -7,6 +7,8 @@ import loadConfig from './config'; // loading this application. We need to disable the callback. app.removeAllListeners(); +require('electron-context-menu')({}); + const appReady = new Promise(resolve => app.once('ready', resolve)); process.on('unhandledRejection', (reason: string) => { diff --git a/package.json b/package.json index 5e678ed..52116bf 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "dependencies": { "electron": "^1.6.8-beta", "electron-window-state": "^4.1.1", + "electron-context-menu": "^0.9.0", "loglevel": "^1.4.1", "menubar": "github:rhysd/menubar#mstdn", "mousetrap": "^1.6.1"