Upload folder using huggingface_hub
Browse files
client/src/components/Refinity.tsx
CHANGED
|
@@ -454,48 +454,48 @@ const Refinity: React.FC = () => {
|
|
| 454 |
<div className="text-gray-600 text-xs mb-3">Revised by: {v.revisedBy ? `${v.revisedBy} (v${v.versionNumber})` : `— (v${v.versionNumber})`}</div>
|
| 455 |
<div className={`text-gray-900 whitespace-pre-wrap break-words leading-relaxed flex-1 overflow-hidden pr-1`}>{snippet}</div>
|
| 456 |
{isCenter && (
|
| 457 |
-
<div className="action-row absolute left-6 right-6 bottom-6
|
| 458 |
-
{/* Invisible first child to bypass first-child quirks while matching pill styles */}
|
| 459 |
<button
|
| 460 |
type="button"
|
| 461 |
aria-hidden="true"
|
| 462 |
tabIndex={-1}
|
| 463 |
className="inline-flex items-center justify-center gap-2 text-white text-sm font-medium rounded-2xl ring-1 ring-inset ring-white/50"
|
| 464 |
-
style={{ opacity: 0, pointerEvents: 'none', padding: '0.5rem 0.75rem', backgroundColor: '#4f46e5', borderRadius: '1rem', border: '1px solid rgba(255,255,255,0.5)' }}
|
| 465 |
-
|
| 466 |
-
|
| 467 |
-
</button>
|
| 468 |
-
<button
|
| 469 |
-
type="button"
|
| 470 |
-
onClick={(e) => {
|
| 471 |
-
e.preventDefault();
|
| 472 |
-
e.stopPropagation();
|
| 473 |
-
console.log('Revise clicked for version:', v.versionNumber, 'id:', v.id);
|
| 474 |
-
selectManual(v.id);
|
| 475 |
-
}}
|
| 476 |
-
className="inline-flex items-center justify-center gap-2 text-white text-sm font-medium rounded-2xl ring-1 ring-inset ring-white/50 active:translate-y-0.5 transition-all duration-200"
|
| 477 |
-
style={{ position: 'relative', zIndex: 3100, pointerEvents: 'auto', padding: '0.5rem 0.75rem', backgroundColor: '#4f46e5', borderRadius: '1rem', border: '1px solid rgba(255,255,255,0.5)', cursor: 'pointer' }}
|
| 478 |
-
>
|
| 479 |
-
Revise
|
| 480 |
-
</button>
|
| 481 |
-
<button
|
| 482 |
-
type="button"
|
| 483 |
-
onClick={(e) => { e.preventDefault(); e.stopPropagation(); setCompareUIOpen(true); if (!compareA) setCompareA(v.id); }}
|
| 484 |
-
className="inline-flex items-center justify-center gap-2 text-black text-sm font-medium rounded-2xl ring-1 ring-inset ring-white/50 active:translate-y-0.5 transition-all duration-200"
|
| 485 |
-
style={{ position: 'relative', zIndex: 3100, pointerEvents: 'auto', padding: '0.5rem 0.75rem', background: 'rgba(255,255,255,0.3)', borderRadius: '1rem', border: '1px solid rgba(255,255,255,0.5)' }}
|
| 486 |
-
>
|
| 487 |
-
Compare
|
| 488 |
-
</button>
|
| 489 |
-
{isAdmin && (
|
| 490 |
<button
|
| 491 |
type="button"
|
| 492 |
-
onClick={(e)=>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 493 |
className="inline-flex items-center justify-center gap-2 text-white text-sm font-medium rounded-2xl ring-1 ring-inset ring-white/50 active:translate-y-0.5 transition-all duration-200"
|
| 494 |
-
style={{ position: 'relative', zIndex: 3100, pointerEvents: 'auto', padding: '0.5rem 0.75rem', backgroundColor: '#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 495 |
>
|
| 496 |
-
|
| 497 |
</button>
|
| 498 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 499 |
</div>
|
| 500 |
)}
|
| 501 |
</div>
|
|
|
|
| 454 |
<div className="text-gray-600 text-xs mb-3">Revised by: {v.revisedBy ? `${v.revisedBy} (v${v.versionNumber})` : `— (v${v.versionNumber})`}</div>
|
| 455 |
<div className={`text-gray-900 whitespace-pre-wrap break-words leading-relaxed flex-1 overflow-hidden pr-1`}>{snippet}</div>
|
| 456 |
{isCenter && (
|
| 457 |
+
<div className="action-row absolute left-6 right-6 bottom-6" data-version-number={v.versionNumber} style={{ pointerEvents: 'auto', transform: 'translateZ(0)', zIndex: 3000 }}>
|
| 458 |
+
{/* Invisible first child to bypass first-child quirks while matching pill styles (kept in place) */}
|
| 459 |
<button
|
| 460 |
type="button"
|
| 461 |
aria-hidden="true"
|
| 462 |
tabIndex={-1}
|
| 463 |
className="inline-flex items-center justify-center gap-2 text-white text-sm font-medium rounded-2xl ring-1 ring-inset ring-white/50"
|
| 464 |
+
style={{ opacity: 0, pointerEvents: 'none', position: 'absolute', left: 0, top: 0, padding: '0.5rem 0.75rem', backgroundColor: '#4f46e5', borderRadius: '1rem', border: '1px solid rgba(255,255,255,0.5)' }}
|
| 465 |
+
/>
|
| 466 |
+
<div className="flex justify-center gap-3 w-full">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 467 |
<button
|
| 468 |
type="button"
|
| 469 |
+
onClick={(e) => {
|
| 470 |
+
e.preventDefault();
|
| 471 |
+
e.stopPropagation();
|
| 472 |
+
console.log('Revise clicked for version:', v.versionNumber, 'id:', v.id);
|
| 473 |
+
selectManual(v.id);
|
| 474 |
+
}}
|
| 475 |
className="inline-flex items-center justify-center gap-2 text-white text-sm font-medium rounded-2xl ring-1 ring-inset ring-white/50 active:translate-y-0.5 transition-all duration-200"
|
| 476 |
+
style={{ position: 'relative', zIndex: 3100, pointerEvents: 'auto', padding: '0.5rem 0.75rem', backgroundColor: '#4f46e5', borderRadius: '1rem', border: '1px solid rgba(255,255,255,0.5)', cursor: 'pointer' }}
|
| 477 |
+
>
|
| 478 |
+
Revise
|
| 479 |
+
</button>
|
| 480 |
+
<button
|
| 481 |
+
type="button"
|
| 482 |
+
onClick={(e) => { e.preventDefault(); e.stopPropagation(); setCompareUIOpen(true); if (!compareA) setCompareA(v.id); }}
|
| 483 |
+
className="inline-flex items-center justify-center gap-2 text-black text-sm font-medium rounded-2xl ring-1 ring-inset ring-white/50 active:translate-y-0.5 transition-all duration-200"
|
| 484 |
+
style={{ position: 'relative', zIndex: 3100, pointerEvents: 'auto', padding: '0.5rem 0.75rem', background: 'rgba(255,255,255,0.3)', borderRadius: '1rem', border: '1px solid rgba(255,255,255,0.5)' }}
|
| 485 |
>
|
| 486 |
+
Compare
|
| 487 |
</button>
|
| 488 |
+
{isAdmin && (
|
| 489 |
+
<button
|
| 490 |
+
type="button"
|
| 491 |
+
onClick={(e)=>{ e.preventDefault(); e.stopPropagation(); deleteVersion(v.id); }}
|
| 492 |
+
className="inline-flex items-center justify-center gap-2 text-white text-sm font-medium rounded-2xl ring-1 ring-inset ring-white/50 active:translate-y-0.5 transition-all duration-200"
|
| 493 |
+
style={{ position: 'relative', zIndex: 3100, pointerEvents: 'auto', padding: '0.5rem 0.75rem', backgroundColor: '#dc2626', borderRadius: '1rem', border: '1px solid rgba(255,255,255,0.5)' }}
|
| 494 |
+
>
|
| 495 |
+
Delete
|
| 496 |
+
</button>
|
| 497 |
+
)}
|
| 498 |
+
</div>
|
| 499 |
</div>
|
| 500 |
)}
|
| 501 |
</div>
|