mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-02 22:55:24 -05:00
feat(ui): save the current staging image with shift+s
This commit is contained in:
committed by
psychedelicious
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(
|
||||
|
||||
Reference in New Issue
Block a user