1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-08-13 22:12:50 +02:00

Desktop: Add option to "Reveal file in folder" when right-clicking on image

Co-authored-by: Vaidotas Šimkus
This commit is contained in:
Laurent Cozic
2020-05-09 11:10:47 +01:00
parent 4e90c05472
commit f4717d0a3d
2 changed files with 13 additions and 0 deletions

View File

@@ -29,6 +29,10 @@ class Bridge {
return this.electronWrapper_.window(); return this.electronWrapper_.window();
} }
showItemInFolder(fullPath) {
return require('electron').shell.showItemInFolder(fullPath);
}
newBrowserWindow(options) { newBrowserWindow(options) {
return new BrowserWindow(options); return new BrowserWindow(options);
} }

View File

@@ -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( menu.append(
new MenuItem({ new MenuItem({
label: _('Copy path to clipboard'), label: _('Copy path to clipboard'),