Update AddMcpServerPopup.tsx (#3604)

This commit is contained in:
自由的世界人 2025-03-19 19:17:41 +08:00 committed by GitHub
parent a2a3760c95
commit e9c9f3b488
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3,7 +3,7 @@ import { useAppSelector } from '@renderer/store'
import { MCPServer } from '@renderer/types' import { MCPServer } from '@renderer/types'
import { Form, Input, Modal, Radio, Switch } from 'antd' import { Form, Input, Modal, Radio, Switch } from 'antd'
import TextArea from 'antd/es/input/TextArea' import TextArea from 'antd/es/input/TextArea'
import { useEffect, useState } from 'react' import React, { useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
interface ShowParams { interface ShowParams {
@ -131,12 +131,10 @@ const PopupContainer: React.FC<Props> = ({ server, create, resolve }) => {
} }
const onCancel = () => { const onCancel = () => {
console.log('onCancel')
setOpen(false) setOpen(false)
} }
const onClose = () => { const onClose = () => {
console.log('onClose')
resolve({}) resolve({})
} }
@ -153,7 +151,8 @@ const PopupContainer: React.FC<Props> = ({ server, create, resolve }) => {
maskClosable={false} maskClosable={false}
width={600} width={600}
transitionName="ant-move-down" transitionName="ant-move-down"
centered> centered
bodyStyle={{ maxHeight: '70vh', overflowY: 'auto' }}>
<Form form={form} layout="vertical"> <Form form={form} layout="vertical">
<Form.Item <Form.Item
name="name" name="name"