chore: ARTEX 初始化
ARTEX — AI 自主渗透测试系统(Go 后端 + Next.js 前端,单二进制内嵌)。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
0ef8561411
287 files changed
+70178
No files matched your search
@@ -0,0 +1,40 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
import {
|
||||
statusMeta,
|
||||
toneClasses,
|
||||
toneDot,
|
||||
type StatusDomain,
|
||||
type Tone,
|
||||
} from "@/lib/status";
|
||||
|
||||
export function StatusBadge({
|
||||
domain,
|
||||
value,
|
||||
dot = false,
|
||||
className,
|
||||
}: {
|
||||
domain: StatusDomain;
|
||||
value: string;
|
||||
dot?: boolean;
|
||||
className?: string;
|
||||
}) {
|
||||
const meta = statusMeta(domain, value);
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
"inline-flex items-center gap-1.5 rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap",
|
||||
toneClasses[meta.tone],
|
||||
className,
|
||||
)}
|
||||
>
|
||||
{dot && (
|
||||
<span className={cn("size-1.5 rounded-full", toneDot[meta.tone])} />
|
||||
)}
|
||||
{meta.label}
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
export function ToneDot({ tone }: { tone: Tone }) {
|
||||
return <span className={cn("size-2 rounded-full", toneDot[tone])} />;
|
||||
}
|
||||
Reference in new issue
Block a user