mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
feat(ui): support collect nodes
This commit is contained in:
parent
027a8562d7
commit
3dc60254b9
@ -12,6 +12,7 @@ import NumberInputFieldComponent from './fields/NumberInputFieldComponent';
|
|||||||
import StringInputFieldComponent from './fields/StringInputFieldComponent';
|
import StringInputFieldComponent from './fields/StringInputFieldComponent';
|
||||||
import ItemInputFieldComponent from './fields/ItemInputFieldComponent';
|
import ItemInputFieldComponent from './fields/ItemInputFieldComponent';
|
||||||
import ColorInputFieldComponent from './fields/ColorInputFieldComponent';
|
import ColorInputFieldComponent from './fields/ColorInputFieldComponent';
|
||||||
|
import ItemInputFieldComponent from './fields/ItemInputFieldComponent';
|
||||||
|
|
||||||
type InputFieldComponentProps = {
|
type InputFieldComponentProps = {
|
||||||
nodeId: string;
|
nodeId: string;
|
||||||
@ -137,6 +138,16 @@ const InputFieldComponent = (props: InputFieldComponentProps) => {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (type === 'item' && template.type === 'item') {
|
||||||
|
return (
|
||||||
|
<ItemInputFieldComponent
|
||||||
|
nodeId={nodeId}
|
||||||
|
field={field}
|
||||||
|
template={template}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return <Box p={2}>Unknown field type: {type}</Box>;
|
return <Box p={2}>Unknown field type: {type}</Box>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -360,6 +360,12 @@ export const buildInputFieldTemplate = (
|
|||||||
if (['color'].includes(fieldType)) {
|
if (['color'].includes(fieldType)) {
|
||||||
return buildColorInputFieldTemplate({ schemaObject, baseField });
|
return buildColorInputFieldTemplate({ schemaObject, baseField });
|
||||||
}
|
}
|
||||||
|
if (['array'].includes(fieldType)) {
|
||||||
|
return buildArrayInputFieldTemplate({ schemaObject, baseField });
|
||||||
|
}
|
||||||
|
if (['item'].includes(fieldType)) {
|
||||||
|
return buildItemInputFieldTemplate({ schemaObject, baseField });
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user