From aafdb784829d2ffe754c49ff7607da69d5e1c192 Mon Sep 17 00:00:00 2001 From: sagitchu Date: Sun, 22 Mar 2026 13:33:37 +0800 Subject: [PATCH] feat: node logo by distro types and official icons --- vite-frontend/src/components/distro-icon.tsx | 42 +++++++++----------- 1 file changed, 18 insertions(+), 24 deletions(-) diff --git a/vite-frontend/src/components/distro-icon.tsx b/vite-frontend/src/components/distro-icon.tsx index de0d151..3936218 100644 --- a/vite-frontend/src/components/distro-icon.tsx +++ b/vite-frontend/src/components/distro-icon.tsx @@ -1,7 +1,9 @@ import type { SVGProps } from "react"; -// Map of Linux distribution names to their SVG logo components. -// Version strings from the agent look like "v1.0.0 (ubuntu/amd64)". +/** + * Linux distribution icons using official SVG paths from simple-icons. + * Version strings from the agent look like "v1.0.0 (ubuntu/amd64)". + */ const distroColors: Record = { ubuntu: "#E95420", @@ -22,19 +24,15 @@ const distroColors: Record = { kali: "#557C94", mint: "#87CF3E", gentoo: "#54487A", - void: "#478061", - nixos: "#7EBAE4", manjaro: "#35BF5C", }; +/* ---------- Official SVG logo components (simple-icons paths) ---------- */ + function UbuntuIcon(props: SVGProps) { return ( - - - - - + ); } @@ -42,7 +40,7 @@ function UbuntuIcon(props: SVGProps) { function DebianIcon(props: SVGProps) { return ( - + ); } @@ -50,11 +48,7 @@ function DebianIcon(props: SVGProps) { function CentOSIcon(props: SVGProps) { return ( - - - - - + ); } @@ -62,7 +56,7 @@ function CentOSIcon(props: SVGProps) { function AlpineIcon(props: SVGProps) { return ( - + ); } @@ -70,9 +64,7 @@ function AlpineIcon(props: SVGProps) { function FedoraIcon(props: SVGProps) { return ( - - - f + ); } @@ -80,20 +72,22 @@ function FedoraIcon(props: SVGProps) { function ArchIcon(props: SVGProps) { return ( - + ); } -function DefaultLinuxIcon(props: SVGProps) { - // Tux-inspired simple penguin outline +function LinuxIcon(props: SVGProps) { + // Official Tux (Linux penguin) logo from simple-icons return ( - + ); } +/* ---------- Exports ---------- */ + type DistroIconProps = SVGProps & { distro: string; }; @@ -150,5 +144,5 @@ export function DistroIcon({ distro, ...props }: DistroIconProps) { if (key.includes("fedora")) return ; if (key.includes("arch") || key.includes("manjaro")) return ; - return ; + return ; }