From 157736ff7ec5e418eee1b6fb833de97539464a53 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Tue, 18 Aug 2020 21:45:22 +0100 Subject: [PATCH] Desktop: Fixed regression: Several menu items did not work anymore --- ElectronClient/gui/SideBar/SideBar.jsx | 6 +++--- ElectronClient/gui/utils/NoteListUtils.js | 8 ++++---- package.json | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ElectronClient/gui/SideBar/SideBar.jsx b/ElectronClient/gui/SideBar/SideBar.jsx index cabedfb9e7..2f1e898f3e 100644 --- a/ElectronClient/gui/SideBar/SideBar.jsx +++ b/ElectronClient/gui/SideBar/SideBar.jsx @@ -255,7 +255,7 @@ class SideBarComponent extends React.Component { if (itemType === BaseModel.TYPE_FOLDER && !item.encryption_applied) { menu.append( - new MenuItem(CommandService.instance().commandToMenuItem('newNotebook', null, { parentId: itemId })) + new MenuItem(CommandService.instance().commandToMenuItem('newNotebook', { parentId: itemId })) ); } @@ -284,7 +284,7 @@ class SideBarComponent extends React.Component { ); if (itemType === BaseModel.TYPE_FOLDER && !item.encryption_applied) { - menu.append(new MenuItem(CommandService.instance().commandToMenuItem('renameFolder', null, { folderId: itemId }))); + menu.append(new MenuItem(CommandService.instance().commandToMenuItem('renameFolder', { folderId: itemId }))); menu.append(new MenuItem({ type: 'separator' })); @@ -317,7 +317,7 @@ class SideBarComponent extends React.Component { if (itemType === BaseModel.TYPE_TAG) { menu.append(new MenuItem( - CommandService.instance().commandToMenuItem('renameTag', null, { tagId: itemId }) + CommandService.instance().commandToMenuItem('renameTag', { tagId: itemId }) )); } diff --git a/ElectronClient/gui/utils/NoteListUtils.js b/ElectronClient/gui/utils/NoteListUtils.js index 4d11c114bb..c93127a70e 100644 --- a/ElectronClient/gui/utils/NoteListUtils.js +++ b/ElectronClient/gui/utils/NoteListUtils.js @@ -48,11 +48,11 @@ class NoteListUtils { if (props.watchedNoteFiles.indexOf(noteIds[0]) < 0) { menu.append( - new MenuItem(cmdService.commandToMenuItem('startExternalEditing', null, { noteId: noteIds[0] })) + new MenuItem(cmdService.commandToMenuItem('startExternalEditing', { noteId: noteIds[0] })) ); } else { menu.append( - new MenuItem(cmdService.commandToMenuItem('stopExternalEditing', null, { noteId: noteIds[0] })) + new MenuItem(cmdService.commandToMenuItem('stopExternalEditing', { noteId: noteIds[0] })) ); } @@ -122,7 +122,7 @@ class NoteListUtils { menu.append( new MenuItem( - cmdService.commandToMenuItem('showShareNoteDialog', null, { noteIds: noteIds.slice() }) + cmdService.commandToMenuItem('showShareNoteDialog', { noteIds: noteIds.slice() }) ) ); @@ -147,7 +147,7 @@ class NoteListUtils { exportMenu.append( new MenuItem( - cmdService.commandToMenuItem('exportPdf', null, { noteIds: noteIds }) + cmdService.commandToMenuItem('exportPdf', { noteIds: noteIds }) ) ); diff --git a/package.json b/package.json index bdb8d17d89..51e35f5683 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "linter": "./node_modules/.bin/eslint --fix --ext .js --ext .jsx --ext .ts --ext .tsx", "linter-ci": "./node_modules/.bin/eslint --ext .js --ext .jsx --ext .ts --ext .tsx", - "watch": "node_modules/typescript/bin/tsc --watch --project tsconfig.dev.json", + "watch": "node node_modules/typescript/bin/tsc --watch --project tsconfig.dev.json", "build": "gulp build", "postinstall": "cd Tools && npm i && cd .. && cd ReactNativeClient && npm i && cd .. && cd ElectronClient && npm i && cd .. && cd CliClient && npm i && cd .. && gulp build" },