mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): restore labels in model manager selects
This commit is contained in:
parent
f4cdfa3b9c
commit
e32eb2a649
@ -1,9 +1,11 @@
|
|||||||
|
import { InvControl } from 'common/components/InvControl/InvControl';
|
||||||
import { InvSelect } from 'common/components/InvSelect/InvSelect';
|
import { InvSelect } from 'common/components/InvSelect/InvSelect';
|
||||||
import type {
|
import type {
|
||||||
InvSelectOption,
|
InvSelectOption,
|
||||||
InvSelectProps,
|
InvSelectProps,
|
||||||
} from 'common/components/InvSelect/types';
|
} from 'common/components/InvSelect/types';
|
||||||
import { MODEL_TYPE_MAP } from 'features/parameters/types/constants';
|
import { MODEL_TYPE_MAP } from 'features/parameters/types/constants';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const options: InvSelectOption[] = [
|
const options: InvSelectOption[] = [
|
||||||
{ value: 'sd-1', label: MODEL_TYPE_MAP['sd-1'] },
|
{ value: 'sd-1', label: MODEL_TYPE_MAP['sd-1'] },
|
||||||
@ -15,5 +17,10 @@ const options: InvSelectOption[] = [
|
|||||||
type BaseModelSelectProps = Omit<InvSelectProps, 'options'>;
|
type BaseModelSelectProps = Omit<InvSelectProps, 'options'>;
|
||||||
|
|
||||||
export default function BaseModelSelect(props: BaseModelSelectProps) {
|
export default function BaseModelSelect(props: BaseModelSelectProps) {
|
||||||
return <InvSelect options={options} {...props} />;
|
const { t } = useTranslation();
|
||||||
|
return (
|
||||||
|
<InvControl label={t('modelManager.baseModel')}>
|
||||||
|
<InvSelect options={options} {...props} />
|
||||||
|
</InvControl>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
|
import { InvControl } from 'common/components/InvControl/InvControl';
|
||||||
import { InvSelect } from 'common/components/InvSelect/InvSelect';
|
import { InvSelect } from 'common/components/InvSelect/InvSelect';
|
||||||
import type {
|
import type {
|
||||||
InvSelectOption,
|
InvSelectOption,
|
||||||
InvSelectProps,
|
InvSelectProps,
|
||||||
} from 'common/components/InvSelect/types';
|
} from 'common/components/InvSelect/types';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
const options: InvSelectOption[] = [
|
const options: InvSelectOption[] = [
|
||||||
{ value: 'normal', label: 'Normal' },
|
{ value: 'normal', label: 'Normal' },
|
||||||
@ -13,5 +15,10 @@ const options: InvSelectOption[] = [
|
|||||||
type VariantSelectProps = Omit<InvSelectProps, 'options'>;
|
type VariantSelectProps = Omit<InvSelectProps, 'options'>;
|
||||||
|
|
||||||
export default function ModelVariantSelect(props: VariantSelectProps) {
|
export default function ModelVariantSelect(props: VariantSelectProps) {
|
||||||
return <InvSelect options={options} {...props} />;
|
const { t } = useTranslation();
|
||||||
|
return (
|
||||||
|
<InvControl label={t('modelManager.variant')}>
|
||||||
|
<InvSelect options={options} {...props} />
|
||||||
|
</InvControl>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user