refactor: better vertical alignment for icon and text in some setting buttons (#4615)
Browse files### What problem does this PR solve?
Fixed vertical alignment issues between icons and text in API-Key and
System Model Settings buttons. This improves visual consistency across
the settings interface.
### Type of change
- [x] Refactoring
Before: Icons and text were slightly misaligned vertically
<img width="635" alt="Screenshot 2025-01-23 at 20 22 46"
src="https://github.com/user-attachments/assets/28f15637-d3fd-45a2-aae8-ca72fb12a88e"
/>
After: Icons and text are now properly centered with consistent spacing
<img width="540" alt="Screenshot 2025-01-23 at 20 23 02"
src="https://github.com/user-attachments/assets/98bb0ca5-6995-42d8-bd23-8a8f44ec0209"
/>
web/src/pages/user-setting/components/setting-title/index.tsx
CHANGED
@@ -27,7 +27,10 @@ const SettingTitle = ({
|
|
27 |
</div>
|
28 |
{showRightButton && (
|
29 |
<Button type={'primary'} onClick={clickButton}>
|
30 |
-
<
|
|
|
|
|
|
|
31 |
</Button>
|
32 |
)}
|
33 |
</Flex>
|
|
|
27 |
</div>
|
28 |
{showRightButton && (
|
29 |
<Button type={'primary'} onClick={clickButton}>
|
30 |
+
<Flex align="center" gap={4}>
|
31 |
+
<SettingOutlined />
|
32 |
+
{t('systemModelSettings')}
|
33 |
+
</Flex>
|
34 |
</Button>
|
35 |
)}
|
36 |
</Flex>
|
web/src/pages/user-setting/setting-model/index.tsx
CHANGED
@@ -92,27 +92,31 @@ const ModelCard = ({ item, clickApiKey }: IModelCardProps) => {
|
|
92 |
<Col span={12} className={styles.factoryOperationWrapper}>
|
93 |
<Space size={'middle'}>
|
94 |
<Button onClick={handleApiKeyClick}>
|
95 |
-
{
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
|
|
|
|
107 |
</Button>
|
108 |
<Button onClick={handleShowMoreClick}>
|
109 |
-
<Flex gap={
|
110 |
{t('showMoreModels')}
|
111 |
<MoreModelIcon />
|
112 |
</Flex>
|
113 |
</Button>
|
114 |
<Button type={'text'} onClick={handleDeleteFactory}>
|
115 |
-
<
|
|
|
|
|
116 |
</Button>
|
117 |
</Space>
|
118 |
</Col>
|
|
|
92 |
<Col span={12} className={styles.factoryOperationWrapper}>
|
93 |
<Space size={'middle'}>
|
94 |
<Button onClick={handleApiKeyClick}>
|
95 |
+
<Flex align="center" gap={4}>
|
96 |
+
{isLocalLlmFactory(item.name) ||
|
97 |
+
item.name === 'VolcEngine' ||
|
98 |
+
item.name === 'Tencent Hunyuan' ||
|
99 |
+
item.name === 'XunFei Spark' ||
|
100 |
+
item.name === 'BaiduYiyan' ||
|
101 |
+
item.name === 'Fish Audio' ||
|
102 |
+
item.name === 'Tencent Cloud' ||
|
103 |
+
item.name === 'Google Cloud' ||
|
104 |
+
item.name === 'Azure OpenAI'
|
105 |
+
? t('addTheModel')
|
106 |
+
: 'API-Key'}
|
107 |
+
<SettingOutlined />
|
108 |
+
</Flex>
|
109 |
</Button>
|
110 |
<Button onClick={handleShowMoreClick}>
|
111 |
+
<Flex align="center" gap={4}>
|
112 |
{t('showMoreModels')}
|
113 |
<MoreModelIcon />
|
114 |
</Flex>
|
115 |
</Button>
|
116 |
<Button type={'text'} onClick={handleDeleteFactory}>
|
117 |
+
<Flex align="center">
|
118 |
+
<CloseCircleOutlined style={{ color: '#D92D20' }} />
|
119 |
+
</Flex>
|
120 |
</Button>
|
121 |
</Space>
|
122 |
</Col>
|