fix corrections ui

This commit is contained in:
Logan
2026-04-19 23:01:28 -04:00
parent ba43796c51
commit 0fb97c3b3c
+17 -9
View File
@@ -155,19 +155,27 @@ export function CallRow({ call, systemName, isAdmin }: Props) {
) : hasSegments ? (
<div className="space-y-1">
<div className="flex items-center justify-between">
<span className="text-xs text-gray-600 font-mono">{call.segments!.length} transmissions</span>
<span className="text-xs text-gray-600 font-mono">
{hasBoth && !showOriginal ? "corrected" : `${call.segments!.length} transmissions`}
</span>
{isAdmin && (
<button onClick={(e) => { e.stopPropagation(); startEdit(); }} className="text-xs text-gray-600 hover:text-gray-400 font-mono transition-colors">edit</button>
)}
</div>
<div className="bg-gray-800 rounded-lg px-4 py-3 space-y-2 max-h-48 overflow-y-auto">
{call.segments!.map((seg, i) => (
<div key={i} className="flex gap-3 text-xs font-mono">
<span className="text-gray-600 shrink-0">{i + 1}. [{seg.start}s]</span>
<span className="text-gray-300">{seg.text}</span>
</div>
))}
</div>
{hasBoth && !showOriginal ? (
<pre className="text-xs text-gray-300 bg-gray-800 rounded-lg px-4 py-3 whitespace-pre-wrap font-mono leading-relaxed max-h-48 overflow-y-auto">
{call.transcript_corrected}
</pre>
) : (
<div className="bg-gray-800 rounded-lg px-4 py-3 space-y-2 max-h-48 overflow-y-auto">
{call.segments!.map((seg, i) => (
<div key={i} className="flex gap-3 text-xs font-mono">
<span className="text-gray-600 shrink-0">{i + 1}. [{seg.start}s]</span>
<span className="text-gray-300">{seg.text}</span>
</div>
))}
</div>
)}
{hasBoth && (
<button
onClick={(e) => { e.stopPropagation(); setShowOriginal((v) => !v); }}