功能修改

This commit is contained in:
npc0-hue
2026-07-20 16:42:33 +08:00
parent 48b8ad8d6c
commit a0e69417db
224 changed files with 22015 additions and 884 deletions
+3 -2
View File
@@ -2,6 +2,7 @@ import { AlertTriangle, CheckCircle2, Copy, Loader2, MoonStar, Sparkles, XCircle
import type { ReactNode } from "react";
import { cx } from "../utils/classes";
import { safeDiagnosticText } from "../utils/safeDiagnosticText";
interface EmptyStateProps {
title: string;
@@ -58,7 +59,7 @@ export function ErrorState({ title, reason, diagnosticId, onRetry, compact }: Er
<AlertTriangle size={compact ? 16 : 24} />
</span>
<strong>{title}</strong>
{reason && <p>{reason}</p>}
{reason && <p>{safeDiagnosticText(reason)}</p>}
{diagnosticId && <DiagnosticSummary diagnosticId={diagnosticId} />}
{onRetry && (
<button type="button" className="state-action" onClick={onRetry}>
@@ -81,7 +82,7 @@ export function ResultBadge({ status, label }: ResultBadgeProps) {
return (
<span className={cx("result-badge", `result-badge-${status}`)}>
{icon}
<span>{label}</span>
<span>{status === "failed" ? safeDiagnosticText(label) : label}</span>
</span>
);
}