mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): spruce up control adapter ui
This commit is contained in:
parent
3e93159bce
commit
1a9d2f1701
@ -131,6 +131,10 @@
|
||||
"upload": "Upload"
|
||||
},
|
||||
"controlnet": {
|
||||
"controlAdapter": "Control Adapter",
|
||||
"controlnet": "$t(controlnet.controlAdapter) #{{number}} (Control Net)",
|
||||
"ip_adapter": "$t(controlnet.controlAdapter) #{{number}} (IP Adapter)",
|
||||
"t2i_adapter": "$t(controlnet.controlAdapter) #{{number}} (T2I Adapter)",
|
||||
"amult": "a_mult",
|
||||
"autoConfigure": "Auto configure processor",
|
||||
"balanced": "Balanced",
|
||||
|
@ -27,8 +27,8 @@ import ParamControlAdapterControlMode from './parameters/ParamControlAdapterCont
|
||||
import ParamControlAdapterProcessorSelect from './parameters/ParamControlAdapterProcessorSelect';
|
||||
import ParamControlAdapterResizeMode from './parameters/ParamControlAdapterResizeMode';
|
||||
|
||||
const ControlAdapterConfig = (props: { id: string }) => {
|
||||
const { id } = props;
|
||||
const ControlAdapterConfig = (props: { id: string; number: number }) => {
|
||||
const { id, number } = props;
|
||||
const controlAdapterType = useControlAdapterType(id);
|
||||
const dispatch = useAppDispatch();
|
||||
const { t } = useTranslation();
|
||||
@ -75,13 +75,19 @@ const ControlAdapterConfig = (props: { id: string }) => {
|
||||
},
|
||||
}}
|
||||
>
|
||||
<Flex sx={{ gap: 2, alignItems: 'center' }}>
|
||||
<Flex
|
||||
sx={{ gap: 2, alignItems: 'center', justifyContent: 'space-between' }}
|
||||
>
|
||||
<IAISwitch
|
||||
tooltip={t('controlnet.toggleControlNet')}
|
||||
label={t(`controlnet.${controlAdapterType}`, { number })}
|
||||
aria-label={t('controlnet.toggleControlNet')}
|
||||
isChecked={isEnabled}
|
||||
onChange={handleToggleIsEnabled}
|
||||
formControlProps={{ w: 'full' }}
|
||||
formLabelProps={{ fontWeight: 600 }}
|
||||
/>
|
||||
</Flex>
|
||||
<Flex sx={{ gap: 2, alignItems: 'center' }}>
|
||||
<Box
|
||||
sx={{
|
||||
w: 'full',
|
||||
|
@ -90,11 +90,10 @@ const ParamControlAdaptersCollapse = () => {
|
||||
T2I Adapter
|
||||
</IAIButton>
|
||||
</ButtonGroup>
|
||||
<Divider />
|
||||
{controlAdapterIds.map((id, i) => (
|
||||
<Fragment key={id}>
|
||||
{i > 0 && <Divider />}
|
||||
<ControlAdapterConfig id={id} />
|
||||
<Divider />
|
||||
<ControlAdapterConfig id={id} number={i + 1} />
|
||||
</Fragment>
|
||||
))}
|
||||
</Flex>
|
||||
|
Loading…
Reference in New Issue
Block a user