Skip to content

Commit

Permalink
feat: Align the cards on the Model Providers page infiniflow#2111
Browse files Browse the repository at this point in the history
  • Loading branch information
cike8899 committed Aug 27, 2024
1 parent c8097e9 commit 854e882
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
11 changes: 11 additions & 0 deletions web/src/pages/user-setting/setting-model/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,22 @@
border: 1px solid #eaecf0;
background: #e3f0ff;
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
:global(.ant-card-body) {
padding: 10px 24px;
}
}
.addedCard {
border-radius: 18px;
border: 1px solid #eaecf0;
background: #e6e7eb;
box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
}
.modelDivider {
margin: 0;
}
.modelTags {
height: 40px;
overflow: hidden;
font-size: 8px;
}
}
12 changes: 7 additions & 5 deletions web/src/pages/user-setting/setting-model/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,20 +286,22 @@ const UserSettingModel = () => {
md: 3,
lg: 4,
xl: 4,
xxl: 8,
xxl: 10,
}}
dataSource={factoryList}
renderItem={(item) => (
<List.Item>
<Card className={styles.toBeAddedCard}>
<Flex vertical gap={'large'}>
<Flex vertical gap={'middle'}>
<LlmIcon name={item.name} />
<Flex vertical gap={'middle'}>
<b>{item.name}</b>
<Text>{item.tags}</Text>
<b>
<Text ellipsis={{ tooltip: item.name }}>{item.name}</Text>
</b>
<Text className={styles.modelTags}>{item.tags}</Text>
</Flex>
</Flex>
<Divider></Divider>
<Divider className={styles.modelDivider}></Divider>
<Button type="link" onClick={() => handleAddModel(item.name)}>
{t('addTheModel')}
</Button>
Expand Down

0 comments on commit 854e882

Please sign in to comment.