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",
|
"loading": "Loading",
|
||||||
"loadingInvokeAI": "Loading Invoke AI",
|
"loadingInvokeAI": "Loading Invoke AI",
|
||||||
"random": "Random",
|
"random": "Random",
|
||||||
"generate": "Generate"
|
"generate": "Generate",
|
||||||
|
"openInNewTab": "Open in New Tab"
|
||||||
},
|
},
|
||||||
"gallery": {
|
"gallery": {
|
||||||
"generations": "Generations",
|
"generations": "Generations",
|
||||||
|
@ -169,11 +169,18 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
|||||||
// dispatch(setIsLightboxOpen(true));
|
// dispatch(setIsLightboxOpen(true));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleOpenInNewTab = () => {
|
||||||
|
window.open(getUrl(image.url), '_blank');
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<ContextMenu<HTMLDivElement>
|
<ContextMenu<HTMLDivElement>
|
||||||
menuProps={{ size: 'sm', isLazy: true }}
|
menuProps={{ size: 'sm', isLazy: true }}
|
||||||
renderMenu={() => (
|
renderMenu={() => (
|
||||||
<MenuList>
|
<MenuList>
|
||||||
|
<MenuItem onClickCapture={handleOpenInNewTab}>
|
||||||
|
{t('common.openInNewTab')}
|
||||||
|
</MenuItem>
|
||||||
{!disabledFeatures.includes('lightbox') && (
|
{!disabledFeatures.includes('lightbox') && (
|
||||||
<MenuItem onClickCapture={handleLightBox}>
|
<MenuItem onClickCapture={handleLightBox}>
|
||||||
{t('parameters.openInViewer')}
|
{t('parameters.openInViewer')}
|
||||||
|
Loading…
Reference in New Issue
Block a user