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]);
|
||||
|
||||
useHotkeys(
|
||||
['shift+s'],
|
||||
() => {
|
||||
shouldShowStagingImage && handleSaveToGallery();
|
||||
},
|
||||
{
|
||||
preventDefault: true,
|
||||
},
|
||||
[shouldShowStagingImage, handleSaveToGallery]
|
||||
);
|
||||
|
||||
const handleDiscardStagingArea = useCallback(() => {
|
||||
dispatch(discardStagedImages());
|
||||
}, [dispatch]);
|
||||
@ -167,7 +178,7 @@ const IAICanvasStagingAreaToolbar = () => {
|
||||
colorScheme="invokeBlue"
|
||||
/>
|
||||
<IconButton
|
||||
tooltip={t('unifiedCanvas.saveToGallery')}
|
||||
tooltip={`${t('unifiedCanvas.saveToGallery')} (Shift+S)`}
|
||||
aria-label={t('unifiedCanvas.saveToGallery')}
|
||||
isDisabled={!imageDTO || !imageDTO.is_intermediate}
|
||||
icon={<PiFloppyDiskBold />}
|
||||
|
@ -88,13 +88,13 @@ const IAICanvasToolbar = () => {
|
||||
useHotkeys(
|
||||
['shift+s'],
|
||||
() => {
|
||||
handleSaveToGallery();
|
||||
!isStaging && handleSaveToGallery();
|
||||
},
|
||||
{
|
||||
enabled: () => !isStaging,
|
||||
enabled: true,
|
||||
preventDefault: true,
|
||||
},
|
||||
[]
|
||||
[isStaging]
|
||||
);
|
||||
|
||||
useHotkeys(
|
||||
|
Loading…
Reference in New Issue
Block a user