add available tag for model downloaded configs

This commit is contained in:
josc146
2023-12-08 15:34:45 +08:00
parent 8a19181a38
commit eea53a6e9e
2 changed files with 16 additions and 3 deletions

View File

@@ -8,6 +8,7 @@ import {
Input,
Label,
Option,
PresenceBadge,
Select,
Switch,
Text
@@ -106,7 +107,13 @@ const Configs: FC = observer(() => {
}
}}>
{commonStore.modelConfigs.map((config, index) =>
<Option key={index} value={index.toString()}>{config.name}</Option>
<Option key={index} value={index.toString()} text={config.name}>
<div className="flex justify-between grow">
{config.name}
{commonStore.modelSourceList.find(item => item.name === config.modelParameters.modelName)?.isComplete
&& <PresenceBadge status="available" />}
</div>
</Option>
)}
</Dropdown>
<ToolTipButton desc={t('New Config')} icon={<AddCircle20Regular />} onClick={() => {