mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): open in new tab @ hoverable image
This commit is contained in:
parent
bee29714d9
commit
c1b10b2222
@ -99,7 +99,8 @@
|
||||
"loading": "Loading",
|
||||
"loadingInvokeAI": "Loading Invoke AI",
|
||||
"random": "Random",
|
||||
"generate": "Generate"
|
||||
"generate": "Generate",
|
||||
"openInNewTab": "Open in New Tab"
|
||||
},
|
||||
"gallery": {
|
||||
"generations": "Generations",
|
||||
|
@ -169,11 +169,18 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
||||
// dispatch(setIsLightboxOpen(true));
|
||||
};
|
||||
|
||||
const handleOpenInNewTab = () => {
|
||||
window.open(getUrl(image.url), '_blank');
|
||||
};
|
||||
|
||||
return (
|
||||
<ContextMenu<HTMLDivElement>
|
||||
menuProps={{ size: 'sm', isLazy: true }}
|
||||
renderMenu={() => (
|
||||
<MenuList>
|
||||
<MenuItem onClickCapture={handleOpenInNewTab}>
|
||||
{t('common.openInNewTab')}
|
||||
</MenuItem>
|
||||
{!disabledFeatures.includes('lightbox') && (
|
||||
<MenuItem onClickCapture={handleLightBox}>
|
||||
{t('parameters.openInViewer')}
|
||||
|
Loading…
Reference in New Issue
Block a user