diff --git a/ElectronClient/bridge.js b/ElectronClient/bridge.js index 339a96e740..2325b27e5c 100644 --- a/ElectronClient/bridge.js +++ b/ElectronClient/bridge.js @@ -29,6 +29,10 @@ class Bridge { return this.electronWrapper_.window(); } + showItemInFolder(fullPath) { + return require('electron').shell.showItemInFolder(fullPath); + } + newBrowserWindow(options) { return new BrowserWindow(options); } diff --git a/ElectronClient/gui/NoteEditor/utils/useMessageHandler.ts b/ElectronClient/gui/NoteEditor/utils/useMessageHandler.ts index fc1b5b89b5..4bc3373227 100644 --- a/ElectronClient/gui/NoteEditor/utils/useMessageHandler.ts +++ b/ElectronClient/gui/NoteEditor/utils/useMessageHandler.ts @@ -71,6 +71,15 @@ export default function useMessageHandler(scrollWhenReady:any, setScrollWhenRead }) ); + menu.append( + new MenuItem({ + label: _('Reveal file in folder'), + click: async () => { + bridge().showItemInFolder(resourcePath); + }, + }) + ); + menu.append( new MenuItem({ label: _('Copy path to clipboard'),