diff --git a/frontend/src/features/gallery/ImageGallery.tsx b/frontend/src/features/gallery/ImageGallery.tsx index 6fe5fff354..dd64544a40 100644 --- a/frontend/src/features/gallery/ImageGallery.tsx +++ b/frontend/src/features/gallery/ImageGallery.tsx @@ -25,7 +25,7 @@ import { ButtonGroup, Spacer, useToast } from '@chakra-ui/react'; import { CSSTransition } from 'react-transition-group'; import { Direction } from 're-resizable/lib/resizer'; import { imageGallerySelector } from './gallerySliceSelectors'; -import { FaWrench } from 'react-icons/fa'; +import { FaImage, FaUser, FaWrench } from 'react-icons/fa'; import IAIPopover from '../../common/components/IAIPopover'; import IAISlider from '../../common/components/IAISlider'; import { BiReset } from 'react-icons/bi'; @@ -319,17 +319,38 @@ export default function ImageGallery() { }} >
- {activeTabName !== 'inpainting' ? ( + {/*{activeTabName !== 'inpainting' ? ( <>

Your Invocations

- ) : null} - + ) : null}*/} +
+ + } + onClick={() => dispatch(setCurrentCategory('result'))} + /> + } + onClick={() => dispatch(setCurrentCategory('user'))} + /> + +
-
- - - - -
); } + +// } +// onClick={() => dispatch(setCurrentCategory('result'))} +// /> +// } +// onClick={() => dispatch(setCurrentCategory('user'))} +// /> diff --git a/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx b/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx index bf5e13fafc..f092fab39b 100644 --- a/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx +++ b/frontend/src/features/tabs/Inpainting/InpaintingControls.tsx @@ -6,6 +6,7 @@ import { FaPalette, FaPlus, FaRedo, + FaTrash, FaUndo, } from 'react-icons/fa'; import { BiHide, BiShow } from 'react-icons/bi'; @@ -24,6 +25,7 @@ import { setShouldInvertMask, setNeedsRepaint, toggleShouldLockBoundingBox, + clearImageToInpaint, } from './inpaintingSlice'; import { MdInvertColors, MdInvertColorsOff } from 'react-icons/md'; @@ -278,124 +280,132 @@ const InpaintingControls = () => { dispatch(setNeedsRepaint(true)); }; + const handleClearImage = () => { + dispatch(clearImageToInpaint()); + }; + return (
-
- } - onClick={handleSelectBrushTool} - data-selected={tool === 'brush'} - isDisabled={!shouldShowMask} - /> - } - > -
- - -
-
- } - onClick={handleSelectEraserTool} - data-selected={tool === 'eraser'} - isDisabled={!shouldShowMask} - /> -
-
- } - isDisabled={!shouldShowMask} - cursor={'pointer'} - /> - } - > - + } + onClick={handleSelectBrushTool} + data-selected={tool === 'brush'} + isDisabled={!shouldShowMask} /> - - : } - onClick={handleToggleShouldShowMask} - /> - - ) : ( - - ) - } - onClick={handleToggleShouldInvertMask} - isDisabled={!shouldShowMask} - /> -
-
- } - onClick={handleUndo} - isDisabled={!canUndo || !shouldShowMask} - /> - } - onClick={handleRedo} - isDisabled={!canRedo || !shouldShowMask} - /> - } - onClick={handleClearMask} - isDisabled={isMaskEmpty || !shouldShowMask} - /> - } - data-selected={showDualDisplay} - onClick={handleDualDisplay} - /> -
+ } + > +
+ + +
+ + } + onClick={handleSelectEraserTool} + data-selected={tool === 'eraser'} + isDisabled={!shouldShowMask} + /> +
+
+ } + isDisabled={!shouldShowMask} + cursor={'pointer'} + /> + } + > + + + : } + onClick={handleToggleShouldShowMask} + /> + + ) : ( + + ) + } + onClick={handleToggleShouldInvertMask} + isDisabled={!shouldShowMask} + /> +
+
+ } + onClick={handleUndo} + isDisabled={!canUndo || !shouldShowMask} + /> + } + onClick={handleRedo} + isDisabled={!canRedo || !shouldShowMask} + /> + } + onClick={handleClearMask} + isDisabled={isMaskEmpty || !shouldShowMask} + /> + } + onClick={handleClearImage} + // isDisabled={} + /> + } + data-selected={showDualDisplay} + onClick={handleDualDisplay} + /> +
); }; diff --git a/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts b/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts index dfa348a241..4cb49a7704 100644 --- a/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts +++ b/frontend/src/features/tabs/Inpainting/inpaintingSlice.ts @@ -337,6 +337,7 @@ export const { setShouldShowBrushPreview, setMaskColor, clearMask, + clearImageToInpaint, undo, redo, setCursorPosition, diff --git a/frontend/src/styles/Mixins/_Variables.scss b/frontend/src/styles/Mixins/_Variables.scss index 9a6fd38597..adbf93dbf0 100644 --- a/frontend/src/styles/Mixins/_Variables.scss +++ b/frontend/src/styles/Mixins/_Variables.scss @@ -10,8 +10,7 @@ $app-content-height: calc(100vh - $app-content-height-cutoff); $app-gallery-height: calc(100vh - ($app-content-height-cutoff + 5.5rem)); $app-gallery-popover-height: calc(100vh - ($app-content-height-cutoff + 6rem)); $app-metadata-height: calc(100vh - ($app-content-height-cutoff + 4.4rem)); -// $app-text-to-image-height: calc(100vh - 9.4375rem); -$app-text-to-image-height: calc(100vh - 9.4375rem - 1.925rem - 1.35rem); +$app-text-to-image-height: calc(100vh - 9.4375rem - 1.925rem - 1.15rem); // do not touch ffs // option bar $options-bar-max-width: 22.5rem;