Upload folder using huggingface_hub
Browse files
client/src/components/Refinity.tsx
CHANGED
|
@@ -438,7 +438,12 @@ const Refinity: React.FC = () => {
|
|
| 438 |
<div className="mt-4 flex gap-3">
|
| 439 |
<button
|
| 440 |
type="button"
|
| 441 |
-
onClick={() =>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 442 |
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"
|
| 443 |
>
|
| 444 |
Revise
|
|
@@ -457,6 +462,21 @@ const Refinity: React.FC = () => {
|
|
| 457 |
);
|
| 458 |
})}
|
| 459 |
</SwiperRoot>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 460 |
{compareUIOpen && (
|
| 461 |
<div className="mt-4 p-3 rounded-2xl border border-gray-200 bg-white/60 backdrop-blur">
|
| 462 |
<div className="flex flex-col md:flex-row gap-3 md:items-end">
|
|
@@ -697,7 +717,7 @@ const EditorPane: React.FC<{ source: string; initialTranslation: string; onBack:
|
|
| 697 |
</div>
|
| 698 |
<div className="w-1/2">
|
| 699 |
<div className="mb-2 text-gray-700 text-sm">Translation</div>
|
| 700 |
-
<textarea value={text} onChange={(e)=>setText(e.target.value)} className="relative z-10 w-full min-h-[420px] 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" />
|
| 701 |
<div className="mt-4 flex gap-3">
|
| 702 |
<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>
|
| 703 |
<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>
|
|
|
|
| 438 |
<div className="mt-4 flex gap-3">
|
| 439 |
<button
|
| 440 |
type="button"
|
| 441 |
+
onClick={(e) => {
|
| 442 |
+
e.preventDefault();
|
| 443 |
+
e.stopPropagation();
|
| 444 |
+
console.log('Revise 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"
|
| 448 |
>
|
| 449 |
Revise
|
|
|
|
| 462 |
);
|
| 463 |
})}
|
| 464 |
</SwiperRoot>
|
| 465 |
+
|
| 466 |
+
{/* External Revise button specifically for v2 when it's centered */}
|
| 467 |
+
{taskVersions[flowIndex]?.versionNumber === 2 && (
|
| 468 |
+
<div
|
| 469 |
+
onClick={() => {
|
| 470 |
+
selectManual(taskVersions[flowIndex].id);
|
| 471 |
+
}}
|
| 472 |
+
className="absolute bottom-6 left-1/2 transform -translate-x-1/2 z-50"
|
| 473 |
+
>
|
| 474 |
+
<div 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">
|
| 475 |
+
Revise
|
| 476 |
+
</div>
|
| 477 |
+
</div>
|
| 478 |
+
)}
|
| 479 |
+
|
| 480 |
{compareUIOpen && (
|
| 481 |
<div className="mt-4 p-3 rounded-2xl border border-gray-200 bg-white/60 backdrop-blur">
|
| 482 |
<div className="flex flex-col md:flex-row gap-3 md:items-end">
|
|
|
|
| 717 |
</div>
|
| 718 |
<div className="w-1/2">
|
| 719 |
<div className="mb-2 text-gray-700 text-sm">Translation</div>
|
| 720 |
+
<textarea value={text} onChange={(e)=>setText(e.target.value)} className="relative z-10 w-full min-h-[420px] 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" style={{ minHeight: '420px', height: 'auto' }} />
|
| 721 |
<div className="mt-4 flex gap-3">
|
| 722 |
<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>
|
| 723 |
<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>
|