diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 8f76db9499..4199387f47 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -997,7 +997,7 @@ "controlNetControlMode": "Control Mode", "copyImage": "Copy Image", "denoisingStrength": "Denoising Strength", - "noRasterLayers": "No Raster Layers", + "disabledNoRasterContent": "Disabled (No Raster Content)", "downloadImage": "Download Image", "general": "General", "guidance": "Guidance", diff --git a/invokeai/frontend/web/src/features/controlLayers/components/ParamDenoisingStrength.tsx b/invokeai/frontend/web/src/features/controlLayers/components/ParamDenoisingStrength.tsx index e5815c6d29..4314c47c01 100644 --- a/invokeai/frontend/web/src/features/controlLayers/components/ParamDenoisingStrength.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/ParamDenoisingStrength.tsx @@ -17,12 +17,15 @@ import { selectImg2imgStrengthConfig } from 'features/system/store/configSlice'; import { memo, useCallback } from 'react'; import { useTranslation } from 'react-i18next'; -const selectIsEnabled = createSelector(selectActiveRasterLayerEntities, (entities) => entities.length > 0); +const selectHasRasterLayersWithContent = createSelector( + selectActiveRasterLayerEntities, + (entities) => entities.length > 0 +); export const ParamDenoisingStrength = memo(() => { const img2imgStrength = useAppSelector(selectImg2imgStrength); const dispatch = useAppDispatch(); - const isEnabled = useAppSelector(selectIsEnabled); + const hasRasterLayersWithContent = useAppSelector(selectHasRasterLayersWithContent); const onChange = useCallback( (v: number) => { @@ -37,16 +40,16 @@ export const ParamDenoisingStrength = memo(() => { const [invokeBlue300] = useToken('colors', ['invokeBlue.300']); return ( - + {`${t('parameters.denoisingStrength')}`} - {isEnabled && ( + {hasRasterLayersWithContent && ( )} - {isEnabled ? ( + {hasRasterLayersWithContent ? ( <> { ) : ( - - {t('common.disabled')} - {t('parameters.noRasterLayers')} - + {t('parameters.disabledNoRasterContent')} )}