/** * Audit score hero: gauge, "Agent Ready" badge, per-domain bars, re-run. */ import { BadgeCheck, RefreshCw, ShieldAlert } from 'lucide-react'; import { Button } from '@/components/ui/button'; import type { AuditResult } from './types'; import { __, sprintf } from '../../lib/i18n'; function scoreColor(score: number): string { if (score >= 90) return '#22c55e'; if (score >= 50) return '#f59e0b'; return '#ef4444'; } function ScoreGauge({ score }: { score: number }) { const radius = 52; const circumference = 2 * Math.PI * radius; const filled = (score / 100) * circumference; return ( ); } interface ScoreHeroProps { result: AuditResult; running: boolean; onRun: () => void; } export function ScoreHero({ result, running, onRun }: ScoreHeroProps) { const lastRun = result.generated_at ? new Date(result.generated_at * 1000).toLocaleString() : null; return (
{__( 'Sampled audit of your site against current agent-readiness standards — discovery files, machine-readable content, security headers, and WebMCP.', 'llmagnet-llm-txt-generator', )}
{lastRun && ({sprintf(__('Last run: %s', 'llmagnet-llm-txt-generator'), lastRun)}
)}