feat(mcp): show inline duplicate ID error and block submit in add mode
- Display red hint next to title when ID exists - Disable Add/Save button and prevent submit on duplicate - Accept existing IDs via prop for real-time validation - Remove overwrite confirmation dialog on add - i18n: add duplicate-ID error strings and remove unused overwrite prompt - files: - src/components/mcp/McpFormModal.tsx - src/components/mcp/McpPanel.tsx - src/i18n/locales/en.json - src/i18n/locales/zh.json
This commit is contained in:
@@ -292,6 +292,7 @@ const McpPanel: React.FC<McpPanelProps> = ({ onClose, onNotify }) => {
|
||||
<McpFormModal
|
||||
editingId={editingId || undefined}
|
||||
initialData={editingId ? servers[editingId] : undefined}
|
||||
existingIds={Object.keys(servers)}
|
||||
onSave={handleSave}
|
||||
onClose={handleCloseForm}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user