mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Electron: Fixes #570: Allow opening files by right-clicking on a resource in macOS
This commit is contained in:
parent
b6619b41df
commit
df9c1e0aeb
@ -394,7 +394,8 @@ class NoteTextComponent extends React.Component {
|
|||||||
const resourcePath = Resource.fullPath(resource);
|
const resourcePath = Resource.fullPath(resource);
|
||||||
|
|
||||||
menu.append(new MenuItem({label: _('Open...'), click: async () => {
|
menu.append(new MenuItem({label: _('Open...'), click: async () => {
|
||||||
bridge().openExternal(resourcePath);
|
const ok = bridge().openExternal('file://' + resourcePath);
|
||||||
|
if (!ok) bridge().showErrorMessageBox(_('This file could not be opened: %s', resourcePath));
|
||||||
}}));
|
}}));
|
||||||
|
|
||||||
menu.append(new MenuItem({label: _('Save as...'), click: async () => {
|
menu.append(new MenuItem({label: _('Save as...'), click: async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user