refactor(McpSettings): simplify args form item and adjust navbar padding for Windows
- Removed unnecessary validation rules from the args Form.Item in McpSettings for cleaner code. - Updated McpSettingsNavbar to conditionally adjust padding based on the operating system. close #4244
This commit is contained in:
parent
bfbfba13fe
commit
f20cbf31a8
@ -370,11 +370,7 @@ const McpSettings: React.FC<Props> = ({ server }) => {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item name="args" label={t('settings.mcp.args')} tooltip={t('settings.mcp.argsTooltip')}>
|
||||||
name="args"
|
|
||||||
label={t('settings.mcp.args')}
|
|
||||||
tooltip={t('settings.mcp.argsTooltip')}
|
|
||||||
rules={[{ required: serverType === 'stdio', message: '' }]}>
|
|
||||||
<TextArea rows={3} placeholder={`arg1\narg2`} style={{ fontFamily: 'monospace' }} />
|
<TextArea rows={3} placeholder={`arg1\narg2`} style={{ fontFamily: 'monospace' }} />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
import { EditOutlined, ExportOutlined, SearchOutlined } from '@ant-design/icons'
|
import { EditOutlined, ExportOutlined, SearchOutlined } from '@ant-design/icons'
|
||||||
import { NavbarRight } from '@renderer/components/app/Navbar'
|
import { NavbarRight } from '@renderer/components/app/Navbar'
|
||||||
import { HStack } from '@renderer/components/Layout'
|
import { HStack } from '@renderer/components/Layout'
|
||||||
|
import { isWindows } from '@renderer/config/constant'
|
||||||
import { EventEmitter } from '@renderer/services/EventService'
|
import { EventEmitter } from '@renderer/services/EventService'
|
||||||
import { Button } from 'antd'
|
import { Button } from 'antd'
|
||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
@ -13,7 +14,7 @@ export const McpSettingsNavbar = () => {
|
|||||||
const onClick = () => window.open('https://mcp.so/', '_blank')
|
const onClick = () => window.open('https://mcp.so/', '_blank')
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<NavbarRight>
|
<NavbarRight style={{ paddingRight: isWindows ? 150 : 12 }}>
|
||||||
<HStack alignItems="center" gap={5}>
|
<HStack alignItems="center" gap={5}>
|
||||||
<Button
|
<Button
|
||||||
size="small"
|
size="small"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user