diff --git a/src/components/PairReviewModal.jsx b/src/components/PairReviewModal.jsx index 2c8924a..f6a90eb 100644 --- a/src/components/PairReviewModal.jsx +++ b/src/components/PairReviewModal.jsx @@ -59,13 +59,22 @@ function buildRows(content) { return rows; } -export default function PairReviewModal({ pair, content, onClose, onDone }) { - const [busy, setBusy] = useState(null); // 'review' | 'block' +export default function PairReviewModal({ pair, content, onClose, onDone, onRetranslate }) { + const [busy, setBusy] = useState(null); // 'review' | 'block' | 'retranslate' const [missing, setMissing] = useState(null); const [error, setError] = useState(null); const rows = buildRows(content); + async function handleRetranslate() { + setBusy('retranslate'); setMissing(null); setError(null); + try { + await onRetranslate(); + } catch (e) { + setError(e.message); + } finally { setBusy(null); } + } + async function handleReview() { setBusy('review'); setMissing(null); setError(null); try { @@ -129,7 +138,15 @@ export default function PairReviewModal({ pair, content, onClose, onDone }) { )} {/* Footer — Aktionen */} -
+
+ {onRetranslate && ( + + )} +