Update McpView.tsx

Moved the restart button to the top
This commit is contained in:
Hannes Rudolph 2025-02-06 21:22:07 -07:00 committed by GitHub
parent 003d4e43a6
commit 4fe2eefeb9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -202,6 +202,13 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM
<div
style={{ display: "flex", alignItems: "center", marginRight: "8px" }}
onClick={(e) => e.stopPropagation()}>
<VSCodeButton
appearance="icon"
onClick={handleRestart}
disabled={server.status === "connecting"}
style={{ marginRight: "8px" }}>
<span className="codicon codicon-refresh" style={{ fontSize: "14px" }}></span>
</VSCodeButton>
<div
role="switch"
aria-checked={!server.disabled}
@ -383,14 +390,6 @@ const ServerRow = ({ server, alwaysAllowMcp }: { server: McpServer; alwaysAllowM
Maximum time to wait for server responses
</span>
</div>
<VSCodeButton
appearance="secondary"
onClick={handleRestart}
disabled={server.status === "connecting"}
style={{ width: "calc(100% - 14px)", margin: "0 7px 3px 7px" }}>
{server.status === "connecting" ? "Restarting..." : "Restart Server"}
</VSCodeButton>
</div>
)
)}