Upload folder using huggingface_hub
Browse files
client/src/components/Refinity.tsx
CHANGED
|
@@ -436,23 +436,37 @@ const Refinity: React.FC = () => {
|
|
| 436 |
<div className={`text-gray-900 whitespace-pre-wrap break-words leading-relaxed flex-1 overflow-hidden pr-1`}>{snippet}</div>
|
| 437 |
{isCenter && (
|
| 438 |
<div className="mt-4 flex gap-3">
|
| 439 |
-
|
| 440 |
-
|
| 441 |
-
|
| 442 |
-
|
| 443 |
-
|
| 444 |
-
|
| 445 |
-
|
| 446 |
-
|
| 447 |
-
|
| 448 |
-
|
| 449 |
-
|
| 450 |
-
|
| 451 |
-
|
| 452 |
-
|
| 453 |
-
|
| 454 |
-
|
| 455 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 456 |
<button
|
| 457 |
type="button"
|
| 458 |
onClick={() => { setCompareUIOpen(true); if (!compareA) setCompareA(v.id); }}
|
|
@@ -715,7 +729,16 @@ const EditorPane: React.FC<{ source: string; initialTranslation: string; onBack:
|
|
| 715 |
</div>
|
| 716 |
<div className="w-1/2">
|
| 717 |
<div className="mb-2 text-gray-700 text-sm">Translation</div>
|
| 718 |
-
<textarea
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 719 |
<div className="mt-4 flex gap-3">
|
| 720 |
<button onClick={save} disabled={saving} className="relative overflow-hidden inline-flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium rounded-2xl text-white ring-1 ring-inset ring-white/50 backdrop-blur-md backdrop-brightness-110 backdrop-saturate-150 bg-indigo-600/70 disabled:bg-gray-400 active:translate-y-0.5 transition-all duration-200">{saving? 'Saving…':'Save'}</button>
|
| 721 |
<button onClick={compareNow} className="relative overflow-hidden inline-flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium rounded-2xl text-black ring-1 ring-inset ring-white/50 backdrop-blur-md bg-white/30 active:translate-y-0.5 transition-all duration-200">Compare</button>
|
|
|
|
| 436 |
<div className={`text-gray-900 whitespace-pre-wrap break-words leading-relaxed flex-1 overflow-hidden pr-1`}>{snippet}</div>
|
| 437 |
{isCenter && (
|
| 438 |
<div className="mt-4 flex gap-3">
|
| 439 |
+
{v.versionNumber === 2 ? (
|
| 440 |
+
<div
|
| 441 |
+
onClick={(e) => {
|
| 442 |
+
e.preventDefault();
|
| 443 |
+
e.stopPropagation();
|
| 444 |
+
console.log('Revise div clicked for version:', v.versionNumber, 'id:', v.id);
|
| 445 |
+
selectManual(v.id);
|
| 446 |
+
}}
|
| 447 |
+
className="inline-flex items-center justify-center gap-2 px-3 py-2 text-sm font-medium rounded-2xl text-white ring-1 ring-inset ring-white/50 backdrop-blur-md backdrop-brightness-110 backdrop-saturate-150 bg-indigo-600/70 active:translate-y-0.5 transition-all duration-200 cursor-pointer"
|
| 448 |
+
style={{
|
| 449 |
+
pointerEvents: 'auto',
|
| 450 |
+
zIndex: 99999,
|
| 451 |
+
position: 'relative'
|
| 452 |
+
}}
|
| 453 |
+
>
|
| 454 |
+
Revise
|
| 455 |
+
</div>
|
| 456 |
+
) : (
|
| 457 |
+
<button
|
| 458 |
+
type="button"
|
| 459 |
+
onClick={(e) => {
|
| 460 |
+
e.preventDefault();
|
| 461 |
+
e.stopPropagation();
|
| 462 |
+
console.log('Revise clicked for version:', v.versionNumber, 'id:', v.id);
|
| 463 |
+
selectManual(v.id);
|
| 464 |
+
}}
|
| 465 |
+
className="inline-flex items-center justify-center gap-2 px-3 py-2 text-sm font-medium rounded-2xl text-white ring-1 ring-inset ring-white/50 backdrop-blur-md backdrop-brightness-110 backdrop-saturate-150 bg-indigo-600/70 active:translate-y-0.5 transition-all duration-200"
|
| 466 |
+
>
|
| 467 |
+
Revise
|
| 468 |
+
</button>
|
| 469 |
+
)}
|
| 470 |
<button
|
| 471 |
type="button"
|
| 472 |
onClick={() => { setCompareUIOpen(true); if (!compareA) setCompareA(v.id); }}
|
|
|
|
| 729 |
</div>
|
| 730 |
<div className="w-1/2">
|
| 731 |
<div className="mb-2 text-gray-700 text-sm">Translation</div>
|
| 732 |
+
<textarea
|
| 733 |
+
value={text}
|
| 734 |
+
onChange={(e)=>setText(e.target.value)}
|
| 735 |
+
className="relative z-10 w-full px-4 py-3 border border-ui-border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500 bg-white resize-y"
|
| 736 |
+
style={{
|
| 737 |
+
minHeight: '420px',
|
| 738 |
+
height: '420px',
|
| 739 |
+
resize: 'vertical'
|
| 740 |
+
}}
|
| 741 |
+
/>
|
| 742 |
<div className="mt-4 flex gap-3">
|
| 743 |
<button onClick={save} disabled={saving} className="relative overflow-hidden inline-flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium rounded-2xl text-white ring-1 ring-inset ring-white/50 backdrop-blur-md backdrop-brightness-110 backdrop-saturate-150 bg-indigo-600/70 disabled:bg-gray-400 active:translate-y-0.5 transition-all duration-200">{saving? 'Saving…':'Save'}</button>
|
| 744 |
<button onClick={compareNow} className="relative overflow-hidden inline-flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium rounded-2xl text-black ring-1 ring-inset ring-white/50 backdrop-blur-md bg-white/30 active:translate-y-0.5 transition-all duration-200">Compare</button>
|