1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

Desktop: Resolves #10746: Fix "View OCR text" not present in context menu when right-clicking an image (#10842)

This commit is contained in:
Henry Heino 2024-08-08 12:02:08 -07:00 committed by GitHub
parent 0caecedb8f
commit a1aa4f78c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -150,7 +150,9 @@ export function menuItems(dispatch: Function, htmlToMd: HtmlToMarkdownHandler, m
bridge().showInfoMessageBox(_('This attachment does not have OCR data (Status: %s)', resourceOcrStatusToString(resource.ocr_status)));
}
},
isActive: (itemType: ContextMenuItemType, _options: ContextMenuOptions) => itemType === ContextMenuItemType.Resource,
isActive: (itemType: ContextMenuItemType, options: ContextMenuOptions) => {
return itemType === ContextMenuItemType.Resource || (itemType === ContextMenuItemType.Image && options.resourceId);
},
},
copyPathToClipboard: {
label: _('Copy path to clipboard'),