enabling download count on marketplace (#3104)
* enabling download count on marketplace * changeset --------- Co-authored-by: Cline Evaluation <cline@example.com>
This commit is contained in:
1 parent
93595af09f
commit
547051bfa8
3 files changed
+11
-6
No files matched your search
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"claude-dev": minor
|
||||
---
|
||||
|
||||
enabling mcp marketplace download counts
|
||||
@@ -181,7 +181,7 @@ const McpMarketplaceCard = ({ item, installedServers }: McpMarketplaceCardProps)
|
||||
<span className="codicon codicon-star-full" />
|
||||
<span style={{ wordBreak: "break-all" }}>{item.githubStars?.toLocaleString() ?? 0}</span>
|
||||
</div>
|
||||
{/* <div
|
||||
<div
|
||||
style={{
|
||||
display: "flex",
|
||||
alignItems: "center",
|
||||
@@ -191,7 +191,7 @@ const McpMarketplaceCard = ({ item, installedServers }: McpMarketplaceCardProps)
|
||||
}}>
|
||||
<span className="codicon codicon-cloud-download" />
|
||||
<span style={{ wordBreak: "break-all" }}>{item.downloadCount?.toLocaleString() ?? 0}</span>
|
||||
</div> */}
|
||||
</div>
|
||||
{item.requiresApiKey && (
|
||||
<span className="codicon codicon-key" title="Requires API key" style={{ flexShrink: 0 }} />
|
||||
)}
|
||||
|
||||
@@ -21,7 +21,7 @@ const McpMarketplaceView = () => {
|
||||
const [isRefreshing, setIsRefreshing] = useState(false)
|
||||
const [searchQuery, setSearchQuery] = useState("")
|
||||
const [selectedCategory, setSelectedCategory] = useState<string | null>(null)
|
||||
const [sortBy, setSortBy] = useState<"newest" | "stars" | "name">("newest")
|
||||
const [sortBy, setSortBy] = useState<"newest" | "stars" | "name" | "downloadCount">("downloadCount")
|
||||
|
||||
const categories = useMemo(() => {
|
||||
const uniqueCategories = new Set(items.map((item) => item.category))
|
||||
@@ -41,8 +41,8 @@ const McpMarketplaceView = () => {
|
||||
})
|
||||
.sort((a, b) => {
|
||||
switch (sortBy) {
|
||||
// case "downloadCount":
|
||||
// return b.downloadCount - a.downloadCount
|
||||
case "downloadCount":
|
||||
return b.downloadCount - a.downloadCount
|
||||
case "stars":
|
||||
return b.githubStars - a.githubStars
|
||||
case "name":
|
||||
@@ -232,7 +232,7 @@ const McpMarketplaceView = () => {
|
||||
}}
|
||||
value={sortBy}
|
||||
onChange={(e) => setSortBy((e.target as HTMLInputElement).value as typeof sortBy)}>
|
||||
{/* <VSCodeRadio value="downloadCount">Most Installs</VSCodeRadio> */}
|
||||
<VSCodeRadio value="downloadCount">Most Installs</VSCodeRadio>
|
||||
<VSCodeRadio value="newest">Newest</VSCodeRadio>
|
||||
<VSCodeRadio value="stars">GitHub Stars</VSCodeRadio>
|
||||
<VSCodeRadio value="name">Name</VSCodeRadio>
|
||||
|
||||
Reference in new issue
Block a user