diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 140fd7610d..10f16a6ab8 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -1692,23 +1692,29 @@ "stylePresets": { "active": "Active", "choosePromptTemplate": "Choose Prompt Template", + "clearTemplateSelection": "Clear Template Selection", "createPromptTemplate": "Create Prompt Template", "defaultTemplates": "Default Templates", "deleteImage": "Delete Image", "deleteTemplate": "Delete Template", "deleteTemplate2": "Are you sure you want to delete this template? This cannot be undone.", "editTemplate": "Edit Template", + "flatten": "Flatten selected template into current prompt", + "insertPlaceholder": "Insert placeholder", "myTemplates": "My Templates", "name": "Name", "negativePrompt": "Negative Prompt", "noMatchingTemplates": "No matching templates", "placeholderDirections": "Use the { } button to specify where your manual prompt should be included in the template. If you do not provide one, the template will be appended to your prompt.", "positivePrompt": "Positive Prompt", + "searchByName": "Search by name", "templateDeleted": "Prompt template deleted", + "toggleViewMode": "Toggle View Mode", "unableToDeleteTemplate": "Unable to delete prompt template", "updatePromptTemplate": "Update Prompt Template", "uploadImage": "Upload Image", - "useForTemplate": "Use For Prompt Template" + "useForTemplate": "Use For Prompt Template", + "viewModeTooltip": "This is how your prompt will look with your currently selected template. To edit your prompt, click anywhere in the text box." }, "upsell": { "inviteTeammates": "Invite Teammates", diff --git a/invokeai/frontend/web/src/features/parameters/components/Prompts/ViewModePrompt.tsx b/invokeai/frontend/web/src/features/parameters/components/Prompts/ViewModePrompt.tsx index eb69bdceed..0d269734fa 100644 --- a/invokeai/frontend/web/src/features/parameters/components/Prompts/ViewModePrompt.tsx +++ b/invokeai/frontend/web/src/features/parameters/components/Prompts/ViewModePrompt.tsx @@ -3,6 +3,7 @@ import { useAppDispatch } from 'app/store/storeHooks'; import { viewModeChanged } from 'features/stylePresets/store/stylePresetSlice'; import { getViewModeChunks } from 'features/stylePresets/util/getViewModeChunks'; import { useCallback, useMemo } from 'react'; +import { useTranslation } from 'react-i18next'; import { PiEyeBold } from 'react-icons/pi'; export const ViewModePrompt = ({ @@ -15,6 +16,7 @@ export const ViewModePrompt = ({ height: number; }) => { const dispatch = useAppDispatch(); + const { t } = useTranslation(); const presetChunks = useMemo(() => { return getViewModeChunks(prompt, presetPrompt); @@ -51,7 +53,7 @@ export const ViewModePrompt = ({ - + diff --git a/invokeai/frontend/web/src/features/stylePresets/components/ActiveStylePreset.tsx b/invokeai/frontend/web/src/features/stylePresets/components/ActiveStylePreset.tsx index 7607c04400..b22346e2c8 100644 --- a/invokeai/frontend/web/src/features/stylePresets/components/ActiveStylePreset.tsx +++ b/invokeai/frontend/web/src/features/stylePresets/components/ActiveStylePreset.tsx @@ -1,4 +1,4 @@ -import { Flex, IconButton, Text } from '@invoke-ai/ui-library'; +import { Flex, IconButton, Text, Tooltip } from '@invoke-ai/ui-library'; import { useAppDispatch, useAppSelector } from 'app/store/storeHooks'; import { negativePromptChanged, positivePromptChanged } from 'features/controlLayers/store/controlLayersSlice'; import { usePresetModifiedPrompts } from 'features/stylePresets/hooks/usePresetModifiedPrompts'; @@ -67,28 +67,34 @@ export const ActiveStylePreset = () => { - } - /> - } - /> - } - /> + + } + /> + + + } + /> + + + } + /> + diff --git a/invokeai/frontend/web/src/features/stylePresets/components/StylePresetMenuTrigger.tsx b/invokeai/frontend/web/src/features/stylePresets/components/StylePresetMenuTrigger.tsx index 1c5c64f8c7..15adc10441 100644 --- a/invokeai/frontend/web/src/features/stylePresets/components/StylePresetMenuTrigger.tsx +++ b/invokeai/frontend/web/src/features/stylePresets/components/StylePresetMenuTrigger.tsx @@ -17,7 +17,7 @@ export const StylePresetMenuTrigger = () => { return ( { label: string; @@ -15,6 +16,7 @@ interface Props extends UseControllerProps { export const StylePresetPromptField = (props: Props) => { const { field } = useController(props); const textareaRef = useRef(null); + const { t } = useTranslation(); const onChange = useCallback>( (v) => { @@ -50,7 +52,7 @@ export const StylePresetPromptField = (props: Props) => { onClick={insertPromptPlaceholder} size="sm" icon={} - aria-label="Insert placeholder" + aria-label={t('stylePresets.insertPlaceholder')} isDisabled={isPromptPresent} /> diff --git a/invokeai/frontend/web/src/features/stylePresets/components/StylePresetSearch.tsx b/invokeai/frontend/web/src/features/stylePresets/components/StylePresetSearch.tsx index 85cc946a36..dcb50e8569 100644 --- a/invokeai/frontend/web/src/features/stylePresets/components/StylePresetSearch.tsx +++ b/invokeai/frontend/web/src/features/stylePresets/components/StylePresetSearch.tsx @@ -41,7 +41,12 @@ const StylePresetSearch = () => { return ( - + {searchTerm && searchTerm.length && (