Forked clean from public hackathon repo (Starfire-AgentTeam, BSL 1.1) with full rebrand to Molecule AI under github.com/Molecule-AI/molecule-monorepo. Brand: Starfire → Molecule AI. Slug: starfire / agent-molecule → molecule. Env vars: STARFIRE_* → MOLECULE_*. Go module: github.com/agent-molecule/platform → github.com/Molecule-AI/molecule-monorepo/platform. Python packages: starfire_plugin → molecule_plugin, starfire_agent → molecule_agent. DB: agentmolecule → molecule. History truncated; see public repo for prior commits and contributor attribution. Verified green: go test -race ./... (platform), pytest (workspace-template 1129 + sdk 132), vitest (canvas 352), build (mcp). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
29 lines
912 B
TypeScript
29 lines
912 B
TypeScript
import type { SecretStatus } from '@/types/secrets';
|
|
|
|
interface StatusBadgeProps {
|
|
status: SecretStatus;
|
|
}
|
|
|
|
const CONFIG: Record<SecretStatus, { icon: string; label: string; className: string }> = {
|
|
verified: { icon: '✓', label: 'Connection status: verified', className: 'status-badge--valid' },
|
|
invalid: { icon: '✗', label: 'Connection status: invalid', className: 'status-badge--invalid' },
|
|
unverified: { icon: '○', label: 'Connection status: unverified', className: 'status-badge--unverified' },
|
|
};
|
|
|
|
/**
|
|
* Status indicator for a secret key.
|
|
* Per spec: always icon + color (never color-only) for colour-blind users.
|
|
*/
|
|
export function StatusBadge({ status }: StatusBadgeProps) {
|
|
const { icon, label, className } = CONFIG[status];
|
|
return (
|
|
<span
|
|
role="status"
|
|
aria-label={label}
|
|
className={`status-badge ${className}`}
|
|
>
|
|
{icon}
|
|
</span>
|
|
);
|
|
}
|