refactor: Decouple roles.

This commit is contained in:
2026-02-23 01:49:24 -08:00
parent 72d35f2641
commit eeaa5045d0
55 changed files with 2144 additions and 1276 deletions

View File

@@ -1,14 +1,12 @@
import { cn } from "@/lib/utils"
import { ROLE_DESCRIPTIONS } from "@/lib/labels"
import { CATEGORY_DESCRIPTIONS } from "@/lib/labels"
const roleColors: Record<string, string> = {
const categoryColors: Record<string, string> = {
service: "bg-green-700 text-white",
tool: "bg-blue-700 text-white",
worker: "bg-blue-500 text-white",
job: "bg-purple-700 text-white",
tool: "bg-blue-700 text-white",
frontend: "bg-yellow-600 text-black",
remote: "bg-gray-600 text-gray-200",
containerized: "bg-orange-600 text-black",
component: "bg-gray-600 text-gray-200",
}
export function RoleBadge({ role }: { role: string }) {
@@ -16,9 +14,9 @@ export function RoleBadge({ role }: { role: string }) {
<span
className={cn(
"inline-block text-[0.65rem] font-semibold uppercase px-1.5 py-0.5 rounded",
roleColors[role] ?? "bg-gray-600 text-gray-200",
categoryColors[role] ?? "bg-gray-600 text-gray-200",
)}
title={ROLE_DESCRIPTIONS[role]}
title={CATEGORY_DESCRIPTIONS[role]}
>
{role}
</span>