feat: add model icon in my models

This commit is contained in:
jialin
2026-07-01 11:42:30 +08:00
committed by jialin
parent 64720ccbfa
commit 185e3475e7
45 changed files with 106 additions and 3 deletions
+12 -3
View File
@@ -1,5 +1,4 @@
import {
IconFont,
StatusTag,
TagsWrapper,
TemplateCard,
@@ -20,6 +19,7 @@ import {
MyModelsStatusValueMap
} from '../config';
import { categoryToPathMap } from '../config/button-actions';
import { getModelLogo } from '../utils/model-logo';
const CardWrapper = styled.div`
&:hover {
@@ -84,6 +84,14 @@ const ModelItemContent = styled.div`
}
`;
const ModelLogo = styled.img`
width: 24px;
height: 24px;
border-radius: 4px;
object-fit: contain;
flex: none;
`;
const Header = styled.div`
margin-bottom: 8px;
display: flex;
@@ -176,10 +184,11 @@ const ModelItem: React.FC<{
header={
<Header>
<span className="text gap-8">
<IconFont
{/* <IconFont
type={sourceIconMap[model.source]}
style={{ fontSize: 24 }}
/>
/> */}
<ModelLogo src={getModelLogo(model.name)} alt="" />
<span>{model.name}</span>
</span>
<StatusTag