balibabu commited on
Commit
b808748
·
1 Parent(s): c33b05f

feat: Align the cards on the Model Providers page #2111 (#2125)

Browse files

### What problem does this PR solve?

feat: Align the cards on the Model Providers page #2111

### Type of change


- [x] New Feature (non-breaking change which adds functionality)

web/src/pages/user-setting/setting-model/index.less CHANGED
@@ -17,6 +17,9 @@
17
  border: 1px solid #eaecf0;
18
  background: #e3f0ff;
19
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
 
 
 
20
  }
21
  .addedCard {
22
  border-radius: 18px;
@@ -24,4 +27,12 @@
24
  background: #e6e7eb;
25
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
26
  }
 
 
 
 
 
 
 
 
27
  }
 
17
  border: 1px solid #eaecf0;
18
  background: #e3f0ff;
19
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
20
+ :global(.ant-card-body) {
21
+ padding: 10px 24px;
22
+ }
23
  }
24
  .addedCard {
25
  border-radius: 18px;
 
27
  background: #e6e7eb;
28
  box-shadow: 0px 1px 2px 0px rgba(16, 24, 40, 0.05);
29
  }
30
+ .modelDivider {
31
+ margin: 0;
32
+ }
33
+ .modelTags {
34
+ height: 40px;
35
+ overflow: hidden;
36
+ font-size: 8px;
37
+ }
38
  }
web/src/pages/user-setting/setting-model/index.tsx CHANGED
@@ -286,20 +286,22 @@ const UserSettingModel = () => {
286
  md: 3,
287
  lg: 4,
288
  xl: 4,
289
- xxl: 8,
290
  }}
291
  dataSource={factoryList}
292
  renderItem={(item) => (
293
  <List.Item>
294
  <Card className={styles.toBeAddedCard}>
295
- <Flex vertical gap={'large'}>
296
  <LlmIcon name={item.name} />
297
  <Flex vertical gap={'middle'}>
298
- <b>{item.name}</b>
299
- <Text>{item.tags}</Text>
 
 
300
  </Flex>
301
  </Flex>
302
- <Divider></Divider>
303
  <Button type="link" onClick={() => handleAddModel(item.name)}>
304
  {t('addTheModel')}
305
  </Button>
 
286
  md: 3,
287
  lg: 4,
288
  xl: 4,
289
+ xxl: 10,
290
  }}
291
  dataSource={factoryList}
292
  renderItem={(item) => (
293
  <List.Item>
294
  <Card className={styles.toBeAddedCard}>
295
+ <Flex vertical gap={'middle'}>
296
  <LlmIcon name={item.name} />
297
  <Flex vertical gap={'middle'}>
298
+ <b>
299
+ <Text ellipsis={{ tooltip: item.name }}>{item.name}</Text>
300
+ </b>
301
+ <Text className={styles.modelTags}>{item.tags}</Text>
302
  </Flex>
303
  </Flex>
304
+ <Divider className={styles.modelDivider}></Divider>
305
  <Button type="link" onClick={() => handleAddModel(item.name)}>
306
  {t('addTheModel')}
307
  </Button>