diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index c309e4de50..f48df3368f 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -1213,14 +1213,14 @@ }, "dynamicPromptsCombinatorial": { "heading": "Combinatorial Generation", - "paragraph": "Generate an image for every possible combination of Dynamic Prompt until the Max Prompts is reached." + "paragraph": "Generate an image for every possible combination of Dynamic Prompts until the Max Prompts is reached." }, "infillMethod": { "heading": "Infill Method", "paragraph": "Method to infill the selected area." }, "lora": { - "heading": "LoRA", + "heading": "LoRA Weight", "paragraph": "Weight of the LoRA. Higher weight will lead to larger impacts on the final image." }, "noiseEnable": { @@ -1239,21 +1239,21 @@ "heading": "Denoising Strength", "paragraph": "How much noise is added to the input image. 0 will result in an identical image, while 1 will result in a completely new image." }, - "paramImages": { - "heading": "Images", - "paragraph": "Number of images that will be generated." + "paramIterations": { + "heading": "Iterations", + "paragraph": "The number of images to generate. If Dynamic Prompts is enabled, each of the prompts will be generated this many times." }, "paramModel": { "heading": "Model", "paragraph": "Model used for the denoising steps. Different models are trained to specialize in producing different aesthetic results and content." }, "paramNegativeConditioning": { - "heading": "Negative Prompts", - "paragraph": "This is where you enter your negative prompts." + "heading": "Negative Prompt", + "paragraph": "The generation process avoids the concepts in the negative prompt. Use this to exclude qualities or objects from the output. Supports Compel syntax and embeddings." }, "paramPositiveConditioning": { - "heading": "Positive Prompts", - "paragraph": "This is where you enter your positive prompts." + "heading": "Positive Prompt", + "paragraph": "Guides the generation process. You may use any words or phrases. Supports Compel and Dynamic Prompts syntaxes and embeddings." }, "paramRatio": { "heading": "Ratio", diff --git a/invokeai/frontend/web/src/common/components/IAIInformationalPopover.tsx b/invokeai/frontend/web/src/common/components/IAIInformationalPopover.tsx index 876ce6488a..4a9dd82665 100644 --- a/invokeai/frontend/web/src/common/components/IAIInformationalPopover.tsx +++ b/invokeai/frontend/web/src/common/components/IAIInformationalPopover.tsx @@ -1,37 +1,43 @@ import { + Box, Button, - Popover, - PopoverTrigger, - PopoverContent, - PopoverArrow, - PopoverCloseButton, - PopoverHeader, - PopoverBody, - PopoverProps, + Divider, Flex, - Text, + Heading, Image, + Popover, + PopoverArrow, + PopoverBody, + PopoverCloseButton, + PopoverContent, + PopoverProps, + PopoverTrigger, + Portal, + Text, } from '@chakra-ui/react'; -import { useAppSelector } from '../../app/store/storeHooks'; +import { ReactNode, memo } from 'react'; import { useTranslation } from 'react-i18next'; +import { useAppSelector } from '../../app/store/storeHooks'; -interface Props extends PopoverProps { +const OPEN_DELAY = 1500; + +type Props = Omit & { details: string; - children: JSX.Element; + children: ReactNode; image?: string; buttonLabel?: string; buttonHref?: string; placement?: PopoverProps['placement']; -} +}; -function IAIInformationalPopover({ +const IAIInformationalPopover = ({ details, image, buttonLabel, buttonHref, children, placement, -}: Props): JSX.Element { +}: Props) => { const shouldEnableInformationalPopovers = useAppSelector( (state) => state.system.shouldEnableInformationalPopovers ); @@ -41,18 +47,21 @@ function IAIInformationalPopover({ const paragraph = t(`popovers.${details}.paragraph`); if (!shouldEnableInformationalPopovers) { - return children; - } else { - return ( - - -
{children}
-
+ return <>{children}; + } + + return ( + + + {children} + + @@ -83,14 +92,17 @@ function IAIInformationalPopover({ gap: 3, flexDirection: 'column', width: '100%', - p: 3, - pt: heading ? 0 : 3, }} > - {heading && {heading}} - {paragraph} + {heading && ( + <> + {heading} + + + )} + {paragraph} {buttonLabel && ( - +