From 642209068ada520f0ebd3e2197d0d18e915c81a1 Mon Sep 17 00:00:00 2001 From: rob thijssen Date: Tue, 5 May 2026 18:24:47 +0300 Subject: [PATCH] feat(ui): forge icons on repo cards (github, gitea, mozilla) Add SVG icons for each forge before the repo name on dashboard cards. Icons sourced from user-provided SVGs in ui/public/. Co-Authored-By: Claude Opus 4.6 (1M context) --- ui/public/gitea.svg | 20 ++++++++++++++++++++ ui/public/github.svg | 2 ++ ui/public/mozilla.svg | 21 +++++++++++++++++++++ ui/src/App.css | 8 ++++++++ ui/src/pages/DashPage.tsx | 11 ++++++++++- 5 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 ui/public/gitea.svg create mode 100644 ui/public/github.svg create mode 100644 ui/public/mozilla.svg diff --git a/ui/public/gitea.svg b/ui/public/gitea.svg new file mode 100644 index 0000000..151d104 --- /dev/null +++ b/ui/public/gitea.svg @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ui/public/github.svg b/ui/public/github.svg new file mode 100644 index 0000000..d539005 --- /dev/null +++ b/ui/public/github.svg @@ -0,0 +1,2 @@ + +GitHub icon \ No newline at end of file diff --git a/ui/public/mozilla.svg b/ui/public/mozilla.svg new file mode 100644 index 0000000..28c5e35 --- /dev/null +++ b/ui/public/mozilla.svg @@ -0,0 +1,21 @@ + + + + + + \ No newline at end of file diff --git a/ui/src/App.css b/ui/src/App.css index 560fb38..5ce5de1 100644 --- a/ui/src/App.css +++ b/ui/src/App.css @@ -105,6 +105,14 @@ a.hot-pink { font-size: 0.9rem; } +.forge-icon { + width: 16px; + height: 16px; + margin-right: 6px; + vertical-align: -2px; + opacity: 0.7; +} + .project-card a { color: #ff4081; } diff --git a/ui/src/pages/DashPage.tsx b/ui/src/pages/DashPage.tsx index f7033c9..8f8fa1c 100644 --- a/ui/src/pages/DashPage.tsx +++ b/ui/src/pages/DashPage.tsx @@ -57,7 +57,7 @@ function ProjectCard({ project: p }: { project: ProjectSummary }) { return (
-
{p.repo}
+
{p.source}{p.repo}
{p.source} {topLangs && ` ยท ${topLangs}`} @@ -75,6 +75,15 @@ function ProjectCard({ project: p }: { project: ProjectSummary }) { ); } +function forgeIcon(source: string): string { + switch (source) { + case 'github': return '/github.svg'; + case 'gitea': return '/gitea.svg'; + case 'hg': return '/mozilla.svg'; + default: return '/github.svg'; + } +} + function topLanguages(langs: Record, n: number): string { return Object.entries(langs) .sort(([, a], [, b]) => b - a)