diff --git a/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamPositiveConditioning.tsx b/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamPositiveConditioning.tsx index 5a52358670..59b5138e3e 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamPositiveConditioning.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Parameters/Core/ParamPositiveConditioning.tsx @@ -148,7 +148,7 @@ const ParamPositiveConditioning = () => { diff --git a/invokeai/frontend/web/src/features/parameters/components/Parameters/Prompt/ParamPromptArea.tsx b/invokeai/frontend/web/src/features/parameters/components/Parameters/Prompt/ParamPromptArea.tsx new file mode 100644 index 0000000000..3066490847 --- /dev/null +++ b/invokeai/frontend/web/src/features/parameters/components/Parameters/Prompt/ParamPromptArea.tsx @@ -0,0 +1,17 @@ +import { Flex } from '@chakra-ui/react'; +import ParamNegativeConditioning from 'features/parameters/components/Parameters/Core/ParamNegativeConditioning'; +import ParamPositiveConditioning from 'features/parameters/components/Parameters/Core/ParamPositiveConditioning'; + +export default function ParamPromptArea() { + return ( + + + + + ); +} diff --git a/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLConcatButton.tsx b/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLConcatButton.tsx new file mode 100644 index 0000000000..9393b245ef --- /dev/null +++ b/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLConcatButton.tsx @@ -0,0 +1,43 @@ +import { RootState } from 'app/store/store'; +import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; +import IAIIconButton from 'common/components/IAIIconButton'; +import { FaLink } from 'react-icons/fa'; +import { setShouldConcatSDXLStylePrompt } from '../store/sdxlSlice'; + +export default function ParamSDXLConcatButton() { + const shouldConcatSDXLStylePrompt = useAppSelector( + (state: RootState) => state.sdxl.shouldConcatSDXLStylePrompt + ); + + const shouldPinParametersPanel = useAppSelector( + (state: RootState) => state.ui.shouldPinParametersPanel + ); + + const dispatch = useAppDispatch(); + + const handleShouldConcatPromptChange = () => { + dispatch(setShouldConcatSDXLStylePrompt(!shouldConcatSDXLStylePrompt)); + }; + + return ( + } + size="xs" + sx={{ + position: 'absolute', + insetInlineEnd: 1, + top: shouldPinParametersPanel ? 12 : 20, + border: 'none', + color: shouldConcatSDXLStylePrompt ? 'accent.500' : 'base.500', + _hover: { + bg: 'none', + }, + }} + > + ); +} diff --git a/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLConcatPrompt.tsx b/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLConcatPrompt.tsx deleted file mode 100644 index 89e67be652..0000000000 --- a/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLConcatPrompt.tsx +++ /dev/null @@ -1,33 +0,0 @@ -import { Box } from '@chakra-ui/react'; -import { RootState } from 'app/store/store'; -import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; -import IAISwitch from 'common/components/IAISwitch'; -import { ChangeEvent } from 'react'; -import { setShouldConcatSDXLStylePrompt } from '../store/sdxlSlice'; - -export default function ParamSDXLConcatPrompt() { - const shouldConcatSDXLStylePrompt = useAppSelector( - (state: RootState) => state.sdxl.shouldConcatSDXLStylePrompt - ); - - const dispatch = useAppDispatch(); - - const handleShouldConcatPromptChange = (e: ChangeEvent) => { - dispatch(setShouldConcatSDXLStylePrompt(e.target.checked)); - }; - - return ( - - - - ); -} diff --git a/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLPromptArea.tsx b/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLPromptArea.tsx new file mode 100644 index 0000000000..513b210a0a --- /dev/null +++ b/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLPromptArea.tsx @@ -0,0 +1,61 @@ +import { Box, Flex } from '@chakra-ui/react'; +import { RootState } from 'app/store/store'; +import { useAppSelector } from 'app/store/storeHooks'; +import ParamNegativeConditioning from 'features/parameters/components/Parameters/Core/ParamNegativeConditioning'; +import ParamPositiveConditioning from 'features/parameters/components/Parameters/Core/ParamPositiveConditioning'; +import { AnimatePresence } from 'framer-motion'; +import ParamSDXLConcatButton from './ParamSDXLConcatButton'; +import ParamSDXLNegativeStyleConditioning from './ParamSDXLNegativeStyleConditioning'; +import ParamSDXLPositiveStyleConditioning from './ParamSDXLPositiveStyleConditioning'; +import SDXLConcatLink from './SDXLConcatLink'; + +export default function ParamSDXLPromptArea() { + const shouldPinParametersPanel = useAppSelector( + (state: RootState) => state.ui.shouldPinParametersPanel + ); + + const shouldConcatSDXLStylePrompt = useAppSelector( + (state: RootState) => state.sdxl.shouldConcatSDXLStylePrompt + ); + + return ( + + + {shouldConcatSDXLStylePrompt && ( + + + + )} + + + {shouldConcatSDXLStylePrompt && ( + + + + )} + + + + + + + + ); +} diff --git a/invokeai/frontend/web/src/features/sdxl/components/SDXLConcatLink.tsx b/invokeai/frontend/web/src/features/sdxl/components/SDXLConcatLink.tsx new file mode 100644 index 0000000000..d64daae70d --- /dev/null +++ b/invokeai/frontend/web/src/features/sdxl/components/SDXLConcatLink.tsx @@ -0,0 +1,109 @@ +import { Box, Flex } from '@chakra-ui/react'; +import { CSSObject } from '@emotion/react'; +import { motion } from 'framer-motion'; +import { FaLink } from 'react-icons/fa'; + +const sharedConcatLinkStyle: CSSObject = { + position: 'absolute', + bg: 'none', + w: 'full', + minH: 2, + borderRadius: 0, + borderLeft: 'none', + borderRight: 'none', + zIndex: 2, + maskImage: + 'radial-gradient(circle at center, black, black 65%, black 30%, black 15%, transparent)', +}; + +export default function SDXLConcatLink() { + return ( + + + + + + + + ); +} diff --git a/invokeai/frontend/web/src/features/sdxl/components/SDXLImageToImageTabParameters.tsx b/invokeai/frontend/web/src/features/sdxl/components/SDXLImageToImageTabParameters.tsx index 05aca62b79..c0b143a557 100644 --- a/invokeai/frontend/web/src/features/sdxl/components/SDXLImageToImageTabParameters.tsx +++ b/invokeai/frontend/web/src/features/sdxl/components/SDXLImageToImageTabParameters.tsx @@ -1,34 +1,14 @@ -import { Flex } from '@chakra-ui/react'; import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/ParamDynamicPromptsCollapse'; -import ParamNegativeConditioning from 'features/parameters/components/Parameters/Core/ParamNegativeConditioning'; -import ParamPositiveConditioning from 'features/parameters/components/Parameters/Core/ParamPositiveConditioning'; import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse'; import ProcessButtons from 'features/parameters/components/ProcessButtons/ProcessButtons'; -import ParamSDXLConcatPrompt from './ParamSDXLConcatPrompt'; -import ParamSDXLNegativeStyleConditioning from './ParamSDXLNegativeStyleConditioning'; -import ParamSDXLPositiveStyleConditioning from './ParamSDXLPositiveStyleConditioning'; +import ParamSDXLPromptArea from './ParamSDXLPromptArea'; import ParamSDXLRefinerCollapse from './ParamSDXLRefinerCollapse'; import SDXLImageToImageTabCoreParameters from './SDXLImageToImageTabCoreParameters'; const SDXLImageToImageTabParameters = () => { return ( <> - - - - - - - + diff --git a/invokeai/frontend/web/src/features/sdxl/components/SDXLTextToImageTabParameters.tsx b/invokeai/frontend/web/src/features/sdxl/components/SDXLTextToImageTabParameters.tsx index eddc0b8891..35bc0b4284 100644 --- a/invokeai/frontend/web/src/features/sdxl/components/SDXLTextToImageTabParameters.tsx +++ b/invokeai/frontend/web/src/features/sdxl/components/SDXLTextToImageTabParameters.tsx @@ -1,34 +1,14 @@ -import { Flex } from '@chakra-ui/react'; import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/ParamDynamicPromptsCollapse'; -import ParamNegativeConditioning from 'features/parameters/components/Parameters/Core/ParamNegativeConditioning'; -import ParamPositiveConditioning from 'features/parameters/components/Parameters/Core/ParamPositiveConditioning'; import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse'; import ProcessButtons from 'features/parameters/components/ProcessButtons/ProcessButtons'; import TextToImageTabCoreParameters from 'features/ui/components/tabs/TextToImage/TextToImageTabCoreParameters'; -import ParamSDXLConcatPrompt from './ParamSDXLConcatPrompt'; -import ParamSDXLNegativeStyleConditioning from './ParamSDXLNegativeStyleConditioning'; -import ParamSDXLPositiveStyleConditioning from './ParamSDXLPositiveStyleConditioning'; +import ParamSDXLPromptArea from './ParamSDXLPromptArea'; import ParamSDXLRefinerCollapse from './ParamSDXLRefinerCollapse'; const SDXLTextToImageTabParameters = () => { return ( <> - - - - - - - + diff --git a/invokeai/frontend/web/src/features/ui/components/tabs/ImageToImage/ImageToImageTabParameters.tsx b/invokeai/frontend/web/src/features/ui/components/tabs/ImageToImage/ImageToImageTabParameters.tsx index 9de6a74ec0..b8de2f8308 100644 --- a/invokeai/frontend/web/src/features/ui/components/tabs/ImageToImage/ImageToImageTabParameters.tsx +++ b/invokeai/frontend/web/src/features/ui/components/tabs/ImageToImage/ImageToImageTabParameters.tsx @@ -2,20 +2,18 @@ import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/Para import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse'; import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse'; import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse'; -import ParamNegativeConditioning from 'features/parameters/components/Parameters/Core/ParamNegativeConditioning'; -import ParamPositiveConditioning from 'features/parameters/components/Parameters/Core/ParamPositiveConditioning'; import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse'; import ParamSeamlessCollapse from 'features/parameters/components/Parameters/Seamless/ParamSeamlessCollapse'; import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse'; // import ParamVariationCollapse from 'features/parameters/components/Parameters/Variations/ParamVariationCollapse'; +import ParamPromptArea from 'features/parameters/components/Parameters/Prompt/ParamPromptArea'; import ProcessButtons from 'features/parameters/components/ProcessButtons/ProcessButtons'; import ImageToImageTabCoreParameters from './ImageToImageTabCoreParameters'; const ImageToImageTabParameters = () => { return ( <> - - + diff --git a/invokeai/frontend/web/src/features/ui/components/tabs/TextToImage/TextToImageTabParameters.tsx b/invokeai/frontend/web/src/features/ui/components/tabs/TextToImage/TextToImageTabParameters.tsx index 8b6fb6f46c..75fa063e17 100644 --- a/invokeai/frontend/web/src/features/ui/components/tabs/TextToImage/TextToImageTabParameters.tsx +++ b/invokeai/frontend/web/src/features/ui/components/tabs/TextToImage/TextToImageTabParameters.tsx @@ -2,20 +2,18 @@ import ParamDynamicPromptsCollapse from 'features/dynamicPrompts/components/Para import ParamLoraCollapse from 'features/lora/components/ParamLoraCollapse'; import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Advanced/ParamAdvancedCollapse'; import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse'; -import ParamNegativeConditioning from 'features/parameters/components/Parameters/Core/ParamNegativeConditioning'; -import ParamPositiveConditioning from 'features/parameters/components/Parameters/Core/ParamPositiveConditioning'; import ParamNoiseCollapse from 'features/parameters/components/Parameters/Noise/ParamNoiseCollapse'; import ParamSeamlessCollapse from 'features/parameters/components/Parameters/Seamless/ParamSeamlessCollapse'; import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse'; // import ParamVariationCollapse from 'features/parameters/components/Parameters/Variations/ParamVariationCollapse'; import ProcessButtons from 'features/parameters/components/ProcessButtons/ProcessButtons'; +import ParamPromptArea from '../../../../parameters/components/Parameters/Prompt/ParamPromptArea'; import TextToImageTabCoreParameters from './TextToImageTabCoreParameters'; const TextToImageTabParameters = () => { return ( <> - - + diff --git a/invokeai/frontend/web/src/features/ui/components/tabs/UnifiedCanvas/UnifiedCanvasParameters.tsx b/invokeai/frontend/web/src/features/ui/components/tabs/UnifiedCanvas/UnifiedCanvasParameters.tsx index 95270c6bbc..de7ce3b084 100644 --- a/invokeai/frontend/web/src/features/ui/components/tabs/UnifiedCanvas/UnifiedCanvasParameters.tsx +++ b/invokeai/frontend/web/src/features/ui/components/tabs/UnifiedCanvas/UnifiedCanvasParameters.tsx @@ -4,18 +4,16 @@ import ParamAdvancedCollapse from 'features/parameters/components/Parameters/Adv import ParamInfillAndScalingCollapse from 'features/parameters/components/Parameters/Canvas/InfillAndScaling/ParamInfillAndScalingCollapse'; import ParamSeamCorrectionCollapse from 'features/parameters/components/Parameters/Canvas/SeamCorrection/ParamSeamCorrectionCollapse'; import ParamControlNetCollapse from 'features/parameters/components/Parameters/ControlNet/ParamControlNetCollapse'; -import ParamNegativeConditioning from 'features/parameters/components/Parameters/Core/ParamNegativeConditioning'; -import ParamPositiveConditioning from 'features/parameters/components/Parameters/Core/ParamPositiveConditioning'; import ParamSymmetryCollapse from 'features/parameters/components/Parameters/Symmetry/ParamSymmetryCollapse'; // import ParamVariationCollapse from 'features/parameters/components/Parameters/Variations/ParamVariationCollapse'; +import ParamPromptArea from 'features/parameters/components/Parameters/Prompt/ParamPromptArea'; import ProcessButtons from 'features/parameters/components/ProcessButtons/ProcessButtons'; import UnifiedCanvasCoreParameters from './UnifiedCanvasCoreParameters'; const UnifiedCanvasParameters = () => { return ( <> - - + diff --git a/invokeai/frontend/web/src/theme/components/textarea.ts b/invokeai/frontend/web/src/theme/components/textarea.ts index b737cf5e57..8dd59c18e0 100644 --- a/invokeai/frontend/web/src/theme/components/textarea.ts +++ b/invokeai/frontend/web/src/theme/components/textarea.ts @@ -13,6 +13,15 @@ const invokeAI = defineStyle((props) => ({ var(--invokeai-colors-base-200) 70%, var(--invokeai-colors-base-200) 100%)`, }, + _disabled: { + '::-webkit-resizer': { + backgroundImage: `linear-gradient(135deg, + var(--invokeai-colors-base-50) 0%, + var(--invokeai-colors-base-50) 70%, + var(--invokeai-colors-base-200) 70%, + var(--invokeai-colors-base-200) 100%)`, + }, + }, _dark: { '::-webkit-resizer': { backgroundImage: `linear-gradient(135deg, @@ -21,6 +30,15 @@ const invokeAI = defineStyle((props) => ({ var(--invokeai-colors-base-800) 70%, var(--invokeai-colors-base-800) 100%)`, }, + _disabled: { + '::-webkit-resizer': { + backgroundImage: `linear-gradient(135deg, + var(--invokeai-colors-base-900) 0%, + var(--invokeai-colors-base-900) 70%, + var(--invokeai-colors-base-800) 70%, + var(--invokeai-colors-base-800) 100%)`, + }, + }, }, }));