fix(ui): restore labels in model manager selects

This commit is contained in:
psychedelicious 2023-12-29 08:59:24 +11:00 committed by Kent Keirsey
parent f4cdfa3b9c
commit e32eb2a649
2 changed files with 16 additions and 2 deletions

View File

@ -1,9 +1,11 @@
import { InvControl } from 'common/components/InvControl/InvControl';
import { InvSelect } from 'common/components/InvSelect/InvSelect';
import type {
InvSelectOption,
InvSelectProps,
} from 'common/components/InvSelect/types';
import { MODEL_TYPE_MAP } from 'features/parameters/types/constants';
import { useTranslation } from 'react-i18next';
const options: InvSelectOption[] = [
{ value: 'sd-1', label: MODEL_TYPE_MAP['sd-1'] },
@ -15,5 +17,10 @@ const options: InvSelectOption[] = [
type BaseModelSelectProps = Omit<InvSelectProps, 'options'>;
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>
);
}

View File

@ -1,8 +1,10 @@
import { InvControl } from 'common/components/InvControl/InvControl';
import { InvSelect } from 'common/components/InvSelect/InvSelect';
import type {
InvSelectOption,
InvSelectProps,
} from 'common/components/InvSelect/types';
import { useTranslation } from 'react-i18next';
const options: InvSelectOption[] = [
{ value: 'normal', label: 'Normal' },
@ -13,5 +15,10 @@ const options: InvSelectOption[] = [
type VariantSelectProps = Omit<InvSelectProps, 'options'>;
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>
);
}