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)