From 1212698059d38c7428c9b508818fd8db202a338c Mon Sep 17 00:00:00 2001 From: psychedelicious <4822129+psychedelicious@users.noreply.github.com> Date: Tue, 30 Apr 2024 13:51:07 +1000 Subject: [PATCH] tidy(ui): more renaming of components --- invokeai/frontend/web/public/locales/en.json | 6 +++++- .../controlLayers/components/AddLayerButton.tsx | 14 ++++++++++---- .../controlLayers/components/LayerTitle.tsx | 4 ++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/invokeai/frontend/web/public/locales/en.json b/invokeai/frontend/web/public/locales/en.json index 814ad4de0d..dbce62c8a4 100644 --- a/invokeai/frontend/web/public/locales/en.json +++ b/invokeai/frontend/web/public/locales/en.json @@ -1537,6 +1537,10 @@ "regionalGuidanceLayer": "$t(controlLayers.regionalGuidance) $t(unifiedCanvas.layer)", "controlNetLayer": "$t(common.controlNet) $t(unifiedCanvas.layer)", "ipAdapterLayer": "$t(common.ipAdapter) $t(unifiedCanvas.layer)", - "opacity": "Opacity" + "opacity": "Opacity", + "globalControlAdapter": "Global $t(controlnet.controlAdapter_one)", + "globalControlAdapterLayer": "Global $t(controlnet.controlAdapter_one) $t(unifiedCanvas.layer)", + "globalIPAdapter": "Global $t(common.ipAdapter)", + "globalIPAdapterLayer": "Global $t(common.ipAdapter) $t(unifiedCanvas.layer)" } } diff --git a/invokeai/frontend/web/src/features/controlLayers/components/AddLayerButton.tsx b/invokeai/frontend/web/src/features/controlLayers/components/AddLayerButton.tsx index 6aeebe3f08..b521153239 100644 --- a/invokeai/frontend/web/src/features/controlLayers/components/AddLayerButton.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/AddLayerButton.tsx @@ -11,7 +11,7 @@ export const AddLayerButton = memo(() => { const addRegionalGuidanceLayer = useCallback(() => { dispatch(guidanceLayerAdded('regional_guidance_layer')); }, [dispatch]); - const addControlNetLayer = useCallback(() => { + const addControlAdapterLayer = useCallback(() => { dispatch(guidanceLayerAdded('control_adapter_layer')); }, [dispatch]); const addIPAdapterLayer = useCallback(() => { @@ -24,9 +24,15 @@ export const AddLayerButton = memo(() => { {t('controlLayers.addLayer')} - {t('controlLayers.regionalGuidanceLayer')} - {t('controlLayers.controlNetLayer')} - {t('controlLayers.ipAdapterLayer')} + } onClick={addRegionalGuidanceLayer}> + {t('controlLayers.regionalGuidanceLayer')} + + } onClick={addControlAdapterLayer}> + {t('controlLayers.globalControlAdapterLayer')} + + } onClick={addIPAdapterLayer}> + {t('controlLayers.globalIPAdapterLayer')} + ); diff --git a/invokeai/frontend/web/src/features/controlLayers/components/LayerTitle.tsx b/invokeai/frontend/web/src/features/controlLayers/components/LayerTitle.tsx index 523bae0490..ba3e01f799 100644 --- a/invokeai/frontend/web/src/features/controlLayers/components/LayerTitle.tsx +++ b/invokeai/frontend/web/src/features/controlLayers/components/LayerTitle.tsx @@ -13,9 +13,9 @@ export const LayerTitle = memo(({ type }: Props) => { if (type === 'regional_guidance_layer') { return t('controlLayers.regionalGuidance'); } else if (type === 'control_adapter_layer') { - return t('common.controlNet'); + return t('controlLayers.globalControlAdapter'); } else if (type === 'ip_adapter_layer') { - return t('common.ipAdapter'); + return t('controlLayers.globalIPAdapter'); } }, [t, type]);