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

@@ -8,7 +8,7 @@ import { ConfirmDialog } from "../ConfirmDialog";
import { extractErrorMessage } from "../../utils/errorUtils";
import { mcpPresets } from "../../config/mcpPresets";
import McpToggle from "./McpToggle";
import { cardStyles, cn } from "../../lib/styles";
import { buttonStyles, cardStyles, cn } from "../../lib/styles";
interface McpPanelProps {
onClose: () => void;
@@ -178,7 +178,7 @@ const McpPanel: React.FC<McpPanelProps> = ({ onClose, onNotify }) => {
<div className="flex items-center gap-3">
<button
onClick={handleAdd}
className="inline-flex items-center gap-2 px-4 py-2 text-sm font-medium rounded-md bg-emerald-500 text-white hover:bg-emerald-600 dark:bg-emerald-600 dark:hover:bg-emerald-700 transition-colors"
className={`inline-flex items-center gap-2 ${buttonStyles.mcp}`}
>
<Plus size={16} />
{t("mcp.add")}