From 6c36a2cee801f2b8d2b61cccd97fb605a62e888b Mon Sep 17 00:00:00 2001 From: Kevin Li Date: Mon, 7 Aug 2023 12:15:55 -0700 Subject: [PATCH 1/3] added context menu --- main.js | 5 +++++ package.json | 1 + 2 files changed, 6 insertions(+) diff --git a/main.js b/main.js index 1079f81c..d99d1b69 100644 --- a/main.js +++ b/main.js @@ -32,6 +32,7 @@ // ipcMain - Communicate asynchronously from the main process to renderer processes // ** Entry point for Electron ** const { app, BrowserWindow, ipcMain, dialog, shell } = require('electron'); +const contextMenu = require('electron-context-menu') const { autoUpdater } = require('electron-updater'); const { @@ -64,6 +65,10 @@ require('./main_process/main_trpcController.js')(); // require mac touchbar const { touchBar } = require('./main_process/main_touchbar.js'); +// +contextMenu() + + // configure logging // autoUpdater.logger = log; // autoUpdater.logger.transports.file.level = 'info'; diff --git a/package.json b/package.json index 930e1f08..05223a58 100644 --- a/package.json +++ b/package.json @@ -125,6 +125,7 @@ "dexie": "^3.2.2", "dexie-react-hooks": "^1.1.1", "dotenv": "^16.0.0", + "electron-context-menu": "^3.6.1", "electron-devtools-installer": "^3.2.0", "electron-log": "^4.4.6", "electron-updater": "^5.3.0", From 5f15d7e75327dbe52b269dabf01ea6da4e094176 Mon Sep 17 00:00:00 2001 From: Kevin Li Date: Mon, 7 Aug 2023 12:19:26 -0700 Subject: [PATCH 2/3] added comment --- main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main.js b/main.js index d99d1b69..fcd840dc 100644 --- a/main.js +++ b/main.js @@ -65,10 +65,9 @@ require('./main_process/main_trpcController.js')(); // require mac touchbar const { touchBar } = require('./main_process/main_touchbar.js'); -// +// right-click menu for cut / copy / paste / Inspect Element contextMenu() - // configure logging // autoUpdater.logger = log; // autoUpdater.logger.transports.file.level = 'info'; From c7110c1db37ecba6f7a3b3d4bfb6f1010656b818 Mon Sep 17 00:00:00 2001 From: Kevin Li Date: Mon, 7 Aug 2023 12:45:01 -0700 Subject: [PATCH 3/3] context menu --- main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main.js b/main.js index fcd840dc..829214d8 100644 --- a/main.js +++ b/main.js @@ -32,7 +32,6 @@ // ipcMain - Communicate asynchronously from the main process to renderer processes // ** Entry point for Electron ** const { app, BrowserWindow, ipcMain, dialog, shell } = require('electron'); -const contextMenu = require('electron-context-menu') const { autoUpdater } = require('electron-updater'); const { @@ -46,6 +45,8 @@ const url = require('url'); const fs = require('fs'); const log = require('electron-log'); + + // proto-parser func for parsing .proto files const protoParserFunc = require('./main_process/protoParser.js'); @@ -66,6 +67,7 @@ require('./main_process/main_trpcController.js')(); const { touchBar } = require('./main_process/main_touchbar.js'); // right-click menu for cut / copy / paste / Inspect Element +const contextMenu = require('electron-context-menu') contextMenu() // configure logging