refactor(mcp): improve UI consistency and i18n

- Add MCP-specific green button style (buttonStyles.mcp)
- Unify MCP panel and form buttons with emerald theme
- Adjust MCP entry button width to match AppSwitcher (px-3)
- Reduce JSON editor height from h-64 to h-48
- Update translations: "Add/Edit Server" → "Add/Edit MCP"
- Change form label to "MCP Title (Unique)" for clarity
- Move config wizard button to right side of JSON label
- Fix McpListItem enabled state check (explicit true check)
This commit is contained in:
Jason
2025-10-10 11:58:40 +08:00
parent 7493f3f9dd
commit 7f1131dfae
7 changed files with 24 additions and 20 deletions

View File

@@ -244,13 +244,13 @@ const McpFormModal: React.FC<McpFormModalProps> = ({
<button
type="button"
onClick={() => setIsWizardOpen(true)}
className="text-xs text-blue-500 dark:text-blue-400 hover:text-blue-600 dark:hover:text-blue-300 transition-colors"
className="text-sm text-blue-500 dark:text-blue-400 hover:text-blue-600 dark:hover:text-blue-300 transition-colors"
>
{t("mcp.form.useWizard")}
</button>
</div>
<textarea
className={`${inputStyles.text} h-64 resize-none font-mono text-xs`}
className={`${inputStyles.text} h-48 resize-none font-mono text-xs`}
placeholder={t("mcp.form.jsonPlaceholder")}
value={formJson}
onChange={(e) => handleJsonChange(e.target.value)}
@@ -272,7 +272,7 @@ const McpFormModal: React.FC<McpFormModalProps> = ({
<button
onClick={handleSubmit}
disabled={saving || (!isEditing && !!idError)}
className={buttonStyles.primary}
className={`inline-flex items-center gap-2 ${buttonStyles.mcp}`}
>
<Save size={16} />
{saving