From e3b4b2c81664acb0d862545b0b66cc32031f0dd7 Mon Sep 17 00:00:00 2001 From: pashpashpash Date: Fri, 14 Feb 2025 14:25:58 -0800 Subject: [PATCH] ui polish --- .../mcp/marketplace/McpMarketplaceCard.tsx | 181 +++++++++--------- 1 file changed, 95 insertions(+), 86 deletions(-) diff --git a/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx b/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx index bbe3ace015..da11b6f78b 100644 --- a/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx +++ b/webview-ui/src/components/mcp/marketplace/McpMarketplaceCard.tsx @@ -1,5 +1,5 @@ import { useEffect, useState } from "react" -import { VSCodeButton } from "@vscode/webview-ui-toolkit/react" +import { VSCodeButton, VSCodeLink } from "@vscode/webview-ui-toolkit/react" import { McpMarketplaceItem, McpServer } from "../../../../../src/shared/mcp" import { vscode } from "../../../utils/vscode" @@ -36,101 +36,110 @@ const McpMarketplaceCard = ({ item, installedServers }: McpMarketplaceCardProps) flexDirection: "column", gap: "12px", }}> -
- {item.logoUrl && ( - {`${item.name} - )} -
-
-
-

{item.name}

-
by {item.author}
-
- { - if (!isInstalled && !isDownloading) { - setIsDownloading(true) - vscode.postMessage({ - type: "downloadMcp", - mcpId: item.mcpId, - }) - } - }}> - - {isInstalled ? "Installed" : isDownloading ? "Downloading..." : "Download"} - -
-

{item.description}

-
- vscode.postMessage({ type: "openFile", text: item.githubUrl })} - title="View on GitHub"> - - -
- - {item.githubStars?.toLocaleString() ?? 0} -
-
- - {item.downloadCount?.toLocaleString() ?? 0} -
- {item.requiresApiKey && ( -
- -
- )} - {item.isRecommended && ( -
- -
- )} -
-
- +
+ {item.logoUrl && ( + {`${item.name} + )} +
+
+
+

{item.name}

+
+ by {item.author} +
+
+ { + if (!isInstalled && !isDownloading) { + setIsDownloading(true) + vscode.postMessage({ + type: "downloadMcp", + mcpId: item.mcpId, + }) + } + }}> + + {isInstalled ? "Installed" : isDownloading ? "Downloading..." : "Download"} + +
+

{item.description}

+
- {item.category} - - {item.tags.map((tag) => ( + + + +
+ + {item.githubStars?.toLocaleString() ?? 0} +
+
+ + {item.downloadCount?.toLocaleString() ?? 0} +
+ {item.requiresApiKey && ( +
+ +
+ )} + {item.isRecommended && ( +
+ +
+ )} +
+
- {tag} + {item.category} - ))} + {item.tags.map((tag) => ( + + {tag} + + ))} +