mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): save the current staging image with shift+s
This commit is contained in:
parent
b93695b78f
commit
30e11b4b42
@ -107,6 +107,17 @@ const IAICanvasStagingAreaToolbar = () => {
|
|||||||
);
|
);
|
||||||
}, [dispatch, imageDTO]);
|
}, [dispatch, imageDTO]);
|
||||||
|
|
||||||
|
useHotkeys(
|
||||||
|
['shift+s'],
|
||||||
|
() => {
|
||||||
|
shouldShowStagingImage && handleSaveToGallery();
|
||||||
|
},
|
||||||
|
{
|
||||||
|
preventDefault: true,
|
||||||
|
},
|
||||||
|
[shouldShowStagingImage, handleSaveToGallery]
|
||||||
|
);
|
||||||
|
|
||||||
const handleDiscardStagingArea = useCallback(() => {
|
const handleDiscardStagingArea = useCallback(() => {
|
||||||
dispatch(discardStagedImages());
|
dispatch(discardStagedImages());
|
||||||
}, [dispatch]);
|
}, [dispatch]);
|
||||||
@ -167,7 +178,7 @@ const IAICanvasStagingAreaToolbar = () => {
|
|||||||
colorScheme="invokeBlue"
|
colorScheme="invokeBlue"
|
||||||
/>
|
/>
|
||||||
<IconButton
|
<IconButton
|
||||||
tooltip={t('unifiedCanvas.saveToGallery')}
|
tooltip={`${t('unifiedCanvas.saveToGallery')} (Shift+S)`}
|
||||||
aria-label={t('unifiedCanvas.saveToGallery')}
|
aria-label={t('unifiedCanvas.saveToGallery')}
|
||||||
isDisabled={!imageDTO || !imageDTO.is_intermediate}
|
isDisabled={!imageDTO || !imageDTO.is_intermediate}
|
||||||
icon={<PiFloppyDiskBold />}
|
icon={<PiFloppyDiskBold />}
|
||||||
|
@ -88,13 +88,13 @@ const IAICanvasToolbar = () => {
|
|||||||
useHotkeys(
|
useHotkeys(
|
||||||
['shift+s'],
|
['shift+s'],
|
||||||
() => {
|
() => {
|
||||||
handleSaveToGallery();
|
!isStaging && handleSaveToGallery();
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
enabled: () => !isStaging,
|
enabled: true,
|
||||||
preventDefault: true,
|
preventDefault: true,
|
||||||
},
|
},
|
||||||
[]
|
[isStaging]
|
||||||
);
|
);
|
||||||
|
|
||||||
useHotkeys(
|
useHotkeys(
|
||||||
|
Loading…
Reference in New Issue
Block a user