tidy(ui): more renaming of components

This commit is contained in:
psychedelicious 2024-04-30 13:51:07 +10:00 committed by Kent Keirsey
parent ba6db33b39
commit 1212698059
3 changed files with 17 additions and 7 deletions

View File

@ -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)"
}
}

View File

@ -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')}
</MenuButton>
<MenuList>
<MenuItem onClick={addRegionalGuidanceLayer}> {t('controlLayers.regionalGuidanceLayer')}</MenuItem>
<MenuItem onClick={addControlNetLayer}> {t('controlLayers.controlNetLayer')}</MenuItem>
<MenuItem onClick={addIPAdapterLayer}> {t('controlLayers.ipAdapterLayer')}</MenuItem>
<MenuItem icon={<PiPlusBold />} onClick={addRegionalGuidanceLayer}>
{t('controlLayers.regionalGuidanceLayer')}
</MenuItem>
<MenuItem icon={<PiPlusBold />} onClick={addControlAdapterLayer}>
{t('controlLayers.globalControlAdapterLayer')}
</MenuItem>
<MenuItem icon={<PiPlusBold />} onClick={addIPAdapterLayer}>
{t('controlLayers.globalIPAdapterLayer')}
</MenuItem>
</MenuList>
</Menu>
);

View File

@ -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]);