Skip to content

Where people and agents ship software together. The open-source git platform for the whole job: issues, agents, checks and deploys to the edge.

g1t.sh
23 linesCodeBlameRaw
1import { AppWindow, BookOpen, Box, Library, Lock, SquareTerminal } from "lucide-react";
2
3import type { ProjectKind } from "@g1t/contracts";
4
5/** Each kind's glyph, so a list says what each project is at a glance. */
6const GLYPH: Record<ProjectKind, typeof Box> = {
7 app: AppWindow,
8 library: Library,
9 tool: SquareTerminal,
10 docs: BookOpen,
11 other: Box,
12};
13
14/**
15 * What a project is, as an icon: an app or site, a library, a tool, docs, or
16 * a box for anything else or a kind not known. `lockPrivate` shows a lock
17 * instead for a private one, where nothing else on the row says so.
18 */
19export function ProjectIcon({ kind, isPrivate, lockPrivate, size }: { kind?: ProjectKind | null; isPrivate?: boolean; lockPrivate?: boolean; size?: number }) {
20 if (isPrivate && lockPrivate) return <Lock size={size} />;
21 const Glyph = (kind && GLYPH[kind]) || Box;
22 return <Glyph size={size} />;
23}