|
1 | 1 | import { useState } from "react" |
| 2 | +import { Button } from "@/components/ui/button" |
2 | 3 | import { |
3 | | - VSCodeButton, |
4 | 4 | VSCodeCheckbox, |
5 | 5 | VSCodeLink, |
6 | 6 | VSCodePanels, |
@@ -39,7 +39,7 @@ const McpView = ({ onDone }: McpViewProps) => { |
39 | 39 | <Tab> |
40 | 40 | <TabHeader className="flex justify-between items-center"> |
41 | 41 | <h3 className="text-vscode-foreground m-0">{t("mcp:title")}</h3> |
42 | | - <VSCodeButton onClick={onDone}>{t("mcp:done")}</VSCodeButton> |
| 42 | + <Button onClick={onDone}>{t("mcp:done")}</Button> |
43 | 43 | </TabHeader> |
44 | 44 |
|
45 | 45 | <TabContent> |
@@ -100,24 +100,24 @@ const McpView = ({ onDone }: McpViewProps) => { |
100 | 100 |
|
101 | 101 | {/* Edit Settings Buttons */} |
102 | 102 | <div style={{ marginTop: "10px", width: "100%", display: "flex", gap: "10px" }}> |
103 | | - <VSCodeButton |
104 | | - appearance="secondary" |
| 103 | + <Button |
| 104 | + variant="secondary" |
105 | 105 | style={{ flex: 1 }} |
106 | 106 | onClick={() => { |
107 | 107 | vscode.postMessage({ type: "openMcpSettings" }) |
108 | 108 | }}> |
109 | 109 | <span className="codicon codicon-edit" style={{ marginRight: "6px" }}></span> |
110 | 110 | {t("mcp:editGlobalMCP")} |
111 | | - </VSCodeButton> |
112 | | - <VSCodeButton |
113 | | - appearance="secondary" |
| 111 | + </Button> |
| 112 | + <Button |
| 113 | + variant="secondary" |
114 | 114 | style={{ flex: 1 }} |
115 | 115 | onClick={() => { |
116 | 116 | vscode.postMessage({ type: "openProjectMcpSettings" }) |
117 | 117 | }}> |
118 | 118 | <span className="codicon codicon-edit" style={{ marginRight: "6px" }}></span> |
119 | 119 | {t("mcp:editProjectMCP")} |
120 | | - </VSCodeButton> |
| 120 | + </Button> |
121 | 121 | </div> |
122 | 122 | </> |
123 | 123 | )} |
@@ -229,19 +229,21 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM |
229 | 229 | <div |
230 | 230 | style={{ display: "flex", alignItems: "center", marginRight: "8px" }} |
231 | 231 | onClick={(e) => e.stopPropagation()}> |
232 | | - <VSCodeButton |
233 | | - appearance="icon" |
| 232 | + <Button |
| 233 | + variant="ghost" |
| 234 | + size="icon" |
234 | 235 | onClick={() => setShowDeleteConfirm(true)} |
235 | 236 | style={{ marginRight: "8px" }}> |
236 | 237 | <span className="codicon codicon-trash" style={{ fontSize: "14px" }}></span> |
237 | | - </VSCodeButton> |
238 | | - <VSCodeButton |
239 | | - appearance="icon" |
| 238 | + </Button> |
| 239 | + <Button |
| 240 | + variant="ghost" |
| 241 | + size="icon" |
240 | 242 | onClick={handleRestart} |
241 | 243 | disabled={server.status === "connecting"} |
242 | 244 | style={{ marginRight: "8px" }}> |
243 | 245 | <span className="codicon codicon-refresh" style={{ fontSize: "14px" }}></span> |
244 | | - </VSCodeButton> |
| 246 | + </Button> |
245 | 247 | <div |
246 | 248 | role="switch" |
247 | 249 | aria-checked={!server.disabled} |
@@ -320,15 +322,15 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM |
320 | 322 | }}> |
321 | 323 | {server.error} |
322 | 324 | </div> |
323 | | - <VSCodeButton |
324 | | - appearance="secondary" |
| 325 | + <Button |
| 326 | + variant="secondary" |
325 | 327 | onClick={handleRestart} |
326 | 328 | disabled={server.status === "connecting"} |
327 | 329 | style={{ width: "calc(100% - 20px)", margin: "0 10px 10px 10px" }}> |
328 | 330 | {server.status === "connecting" |
329 | 331 | ? t("mcp:serverStatus.retrying") |
330 | 332 | : t("mcp:serverStatus.retryConnection")} |
331 | | - </VSCodeButton> |
| 333 | + </Button> |
332 | 334 | </div> |
333 | 335 | ) : ( |
334 | 336 | isExpanded && ( |
@@ -444,12 +446,12 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM |
444 | 446 | </DialogDescription> |
445 | 447 | </DialogHeader> |
446 | 448 | <DialogFooter> |
447 | | - <VSCodeButton appearance="secondary" onClick={() => setShowDeleteConfirm(false)}> |
| 449 | + <Button variant="secondary" onClick={() => setShowDeleteConfirm(false)}> |
448 | 450 | {t("mcp:deleteDialog.cancel")} |
449 | | - </VSCodeButton> |
450 | | - <VSCodeButton appearance="primary" onClick={handleDelete}> |
| 451 | + </Button> |
| 452 | + <Button variant="default" onClick={handleDelete}> |
451 | 453 | {t("mcp:deleteDialog.delete")} |
452 | | - </VSCodeButton> |
| 454 | + </Button> |
453 | 455 | </DialogFooter> |
454 | 456 | </DialogContent> |
455 | 457 | </Dialog> |
|
0 commit comments