Skip to content

Commit c08a1e1

Browse files
committed
🎨 资产面板使用真实品牌 logo
将「一个应用,连接你的整套基础设施」中的资产图标替换为 react-icons/si 的官方品牌 logo(MySQL、PostgreSQL、SQLite、 MongoDB、Redis、etcd、Kafka、Kubernetes),并为每个 logo 配置可在亮/暗两种主题下保持可读的品牌色;SSH/串口/本地终端 等连接类型保留中性图标。
1 parent 93c6abd commit c08a1e1

1 file changed

Lines changed: 38 additions & 20 deletions

File tree

‎src/components/landing/ResourcePanorama.tsx‎

Lines changed: 38 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,65 +6,83 @@ import {
66
SquareTerminal,
77
Cable,
88
Database,
9-
HardDrive,
10-
Leaf,
119
Layers,
12-
Network,
13-
RadioTower,
1410
Hexagon,
1511
Sparkles,
1612
Plus,
1713
ArrowRight,
1814
} from "lucide-react";
15+
import {
16+
SiMysql,
17+
SiPostgresql,
18+
SiSqlite,
19+
SiMongodb,
20+
SiRedis,
21+
SiEtcd,
22+
SiApachekafka,
23+
SiKubernetes,
24+
} from "react-icons/si";
1925

20-
type Chip = { icon: ReactNode; label: string; labelId?: string };
26+
// Brand colors are tuned to stay legible on both the light (#fff) and
27+
// dark (#161922) chip surfaces. Near-black logos (Kafka) inherit the
28+
// theme foreground via `var(--foreground)` so they don't disappear in dark mode.
29+
type Chip = { icon: ReactNode; label: string; labelId?: string; color?: string };
2130
type Category = { icon: ReactNode; id: string; name: string; chips: Chip[] };
2231

32+
const logo = "size-[15px]";
33+
2334
const categories: Category[] = [
2435
{
2536
icon: <Server className="size-4" />,
2637
id: "res.cat.servers",
2738
name: "Servers & terminals",
2839
chips: [
29-
{ icon: <Server className="size-[15px]" />, label: "SSH" },
30-
{ icon: <SquareTerminal className="size-[15px]" />, label: "Local terminal", labelId: "res.chip.local" },
31-
{ icon: <Cable className="size-[15px]" />, label: "Serial", labelId: "res.chip.serial" },
40+
// SSH / serial / local terminal are connection types, not products — keep neutral glyphs.
41+
{ icon: <Server className={logo} />, label: "SSH" },
42+
{ icon: <SquareTerminal className={logo} />, label: "Local terminal", labelId: "res.chip.local" },
43+
{ icon: <Cable className={logo} />, label: "Serial", labelId: "res.chip.serial" },
3244
],
3345
},
3446
{
3547
icon: <Database className="size-4" />,
3648
id: "res.cat.db",
3749
name: "Databases",
3850
chips: [
39-
{ icon: <Database className="size-[15px]" />, label: "MySQL" },
40-
{ icon: <Database className="size-[15px]" />, label: "PostgreSQL" },
41-
{ icon: <Database className="size-[15px]" />, label: "SQL Server" },
42-
{ icon: <HardDrive className="size-[15px]" />, label: "SQLite" },
43-
{ icon: <Leaf className="size-[15px]" />, label: "MongoDB" },
51+
{ icon: <SiMysql className={logo} />, label: "MySQL", color: "#00758F" },
52+
{ icon: <SiPostgresql className={logo} />, label: "PostgreSQL", color: "#336791" },
53+
// No official SQL Server logo in Simple Icons — use the generic db glyph in MSSQL red.
54+
{ icon: <Database className={logo} />, label: "SQL Server", color: "#CC2927" },
55+
{ icon: <SiSqlite className={logo} />, label: "SQLite", color: "#0F80CC" },
56+
{ icon: <SiMongodb className={logo} />, label: "MongoDB", color: "#47A248" },
4457
],
4558
},
4659
{
4760
icon: <Layers className="size-4" />,
4861
id: "res.cat.middleware",
4962
name: "Cache & middleware",
5063
chips: [
51-
{ icon: <Layers className="size-[15px]" />, label: "Redis" },
52-
{ icon: <Network className="size-[15px]" />, label: "etcd" },
53-
{ icon: <RadioTower className="size-[15px]" />, label: "Kafka" },
64+
{ icon: <SiRedis className={logo} />, label: "Redis", color: "#DC382D" },
65+
{ icon: <SiEtcd className={logo} />, label: "etcd", color: "#419EDA" },
66+
{ icon: <SiApachekafka className={logo} />, label: "Kafka", color: "var(--foreground)" },
5467
],
5568
},
5669
{
5770
icon: <Hexagon className="size-4" />,
5871
id: "res.cat.cloud",
5972
name: "Cloud-native",
60-
chips: [{ icon: <Hexagon className="size-[15px]" />, label: "Kubernetes" }],
73+
chips: [{ icon: <SiKubernetes className={logo} />, label: "Kubernetes", color: "#326CE5" }],
6174
},
6275
];
6376

64-
function ChipPill({ icon, label, labelId }: Chip) {
77+
function ChipPill({ icon, label, labelId, color }: Chip) {
6578
return (
6679
<span className="inline-flex items-center gap-2 rounded-full border border-border bg-card px-3.5 py-2 text-[13px] font-medium leading-none text-foreground">
67-
<span className="inline-flex shrink-0 items-center text-muted-foreground">{icon}</span>
80+
<span
81+
className={`inline-flex shrink-0 items-center ${color ? "" : "text-muted-foreground"}`}
82+
style={color ? { color } : undefined}
83+
>
84+
{icon}
85+
</span>
6886
<span className="leading-none">
6987
{labelId ? <Translate id={labelId}>{label}</Translate> : label}
7088
</span>
@@ -103,7 +121,7 @@ export function ResourcePanorama() {
103121
</div>
104122
<div className="flex flex-wrap items-center gap-2.5">
105123
{cat.chips.map((c) => (
106-
<ChipPill key={c.label} icon={c.icon} label={c.label} labelId={c.labelId} />
124+
<ChipPill key={c.label} {...c} />
107125
))}
108126
</div>
109127
</div>

0 commit comments

Comments
 (0)