@devries-cameron20 / t3code Mirror · read-only
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 21, 04:45 UTC

main
tsx 41 lines 1.24 KB
Raw
1 import type { EnvironmentMachineKind } from "@t3tools/contracts";
2 import { msg, useMessages } from "gt-react-native";
3
4 import { SymbolView, type AppSymbolName } from "./ui/AppSymbol";
5
6 export const ENVIRONMENT_MACHINE_SYMBOLS = {
7 server: "server.rack",
8 cloud: "cloud",
9 linux: "terminal",
10 desktop: "desktopcomputer",
11 laptop: "laptopcomputer",
12 "mac-mini": "macmini",
13 "mac-studio": "macstudio",
14 } as const satisfies Record<EnvironmentMachineKind, AppSymbolName>;
15
16 const ENVIRONMENT_MACHINE_KIND_LABELS: Record<EnvironmentMachineKind, string> = {
17 server: msg("Server", { $context: "machine type" }),
18 cloud: msg("Cloud VM"),
19 linux: msg("Linux/WSL"),
20 desktop: msg("Desktop", { $context: "machine type" }),
21 laptop: msg("Laptop"),
22 "mac-mini": msg("Mini PC"),
23 "mac-studio": msg("Workstation"),
24 };
25
26 export function EnvironmentMachineSymbol(props: {
27 readonly kind: EnvironmentMachineKind;
28 readonly size: number;
29 readonly tintColorClassName: string;
30 }) {
31 const m = useMessages();
32 return (
33 <SymbolView
34 accessibilityLabel={m(ENVIRONMENT_MACHINE_KIND_LABELS[props.kind])}
35 name={ENVIRONMENT_MACHINE_SYMBOLS[props.kind]}
36 size={props.size}
37 tintColorClassName={props.tintColorClassName}
38 type="monochrome"
39 />
40 );
41 }