Skip to content

Commit 8a255d5

Browse files
MarkShawn2020claude
andcommitted
refactor(marketplace): 优化 source filter 标签和交互
- 重命名: Official→Anthropic, Personal→Lovstudio, Community→CCT - 添加 hover tooltip 显示对应 GitHub 仓库地址 - 移除 source filter 按钮的图标及相关未使用的 imports 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b2ae228 commit 8a255d5

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/constants/index.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,8 @@ import {
1111
MixerHorizontalIcon,
1212
CubeIcon,
1313
ChatBubbleIcon,
14-
GlobeIcon,
15-
StarFilledIcon,
1614
TargetIcon,
1715
LayersIcon,
18-
HeartFilledIcon,
1916
PersonIcon,
2017
} from "@radix-ui/react-icons";
2118
import type { FeatureType, FeatureConfig, TemplateCategory } from "../types";
@@ -139,10 +136,10 @@ export const FEATURES: FeatureConfig[] = [
139136
// ============================================================================
140137

141138
export const SOURCE_FILTERS = [
142-
{ id: "all", label: "All", icon: GlobeIcon },
143-
{ id: "anthropic", label: "Official", icon: StarFilledIcon },
144-
{ id: "lovstudio", label: "Personal", icon: HeartFilledIcon },
145-
{ id: "community", label: "Community", icon: GlobeIcon },
139+
{ id: "all", label: "All", tooltip: "All sources" },
140+
{ id: "anthropic", label: "Anthropic", tooltip: "github.com/anthropics/claude-plugins-official" },
141+
{ id: "lovstudio", label: "Lovstudio", tooltip: "github.com/markshawn2020/lovstudio-plugins-official" },
142+
{ id: "community", label: "CCT", tooltip: "github.com/davila7/claude-code-templates" },
146143
] as const;
147144

148145
export type SourceFilterId = (typeof SOURCE_FILTERS)[number]["id"];

src/views/Marketplace/MarketplaceView.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,13 @@ export function MarketplaceView({ initialCategory, onSelectTemplate }: Marketpla
8989
<button
9090
key={sf.id}
9191
onClick={() => setSourceFilter(sf.id as SourceFilterId)}
92+
title={sf.tooltip}
9293
className={`px-3 py-1.5 rounded-lg text-sm transition-colors flex items-center gap-1.5 ${
9394
sourceFilter === sf.id
9495
? "bg-primary text-primary-foreground"
9596
: "bg-card border border-border text-muted-foreground hover:text-ink hover:border-primary/50"
9697
}`}
9798
>
98-
<sf.icon className="w-4 h-4" />
9999
<span>{sf.label}</span>
100100
{sf.count > 0 && (
101101
<span

0 commit comments

Comments
 (0)