简化界面:删除导入当前配置功能

- 移除 ImportConfigModal 组件及相关文件
- 删除头部的导入当前配置按钮
- 移除 importCurrentConfig 相关的 API 和 IPC 处理器
- 保留 importCurrentConfigAsDefault 功能用于首次启动
- 界面更简洁,专注核心功能:添加、编辑、切换、删除供应商
- 减少用户困惑,因为自动创建的默认供应商已经满足大部分需求
This commit is contained in:
farion1231
2025-08-07 21:37:34 +08:00
parent ac96f9f551
commit 5be45e269c
5 changed files with 0 additions and 172 deletions

View File

@@ -1,67 +0,0 @@
import React, { useState } from 'react'
import './AddProviderModal.css'
interface ImportConfigModalProps {
onImport: (name: string) => void
onClose: () => void
}
const ImportConfigModal: React.FC<ImportConfigModalProps> = ({ onImport, onClose }) => {
const [name, setName] = useState('')
const [error, setError] = useState('')
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault()
setError('')
if (!name.trim()) {
setError('请输入供应商名称')
return
}
onImport(name.trim())
}
return (
<div className="modal-overlay">
<div className="modal-content">
<h2></h2>
<p style={{marginBottom: '1.5rem', color: '#666', fontSize: '0.9rem'}}>
<code>~/.claude/settings.json</code>
<br />
<strong></strong>
</p>
{error && <div className="error-message">{error}</div>}
<form onSubmit={handleSubmit}>
<div className="form-group">
<label htmlFor="name"> *</label>
<input
type="text"
id="name"
name="name"
value={name}
onChange={(e) => setName(e.target.value)}
placeholder="例如:我的当前配置"
required
autoFocus
/>
</div>
<div className="form-actions">
<button type="button" className="cancel-btn" onClick={onClose}>
</button>
<button type="submit" className="submit-btn">
</button>
</div>
</form>
</div>
</div>
)
}
export default ImportConfigModal