Upload folder using huggingface_hub
Browse files
client/src/components/Refinity.tsx
CHANGED
|
@@ -422,8 +422,8 @@ const Refinity: React.FC = () => {
|
|
| 422 |
<div
|
| 423 |
className={`relative h-full rounded-2xl p-6 bg-white ring-1 ring-gray-200 shadow-xl text-base overflow-hidden flex flex-col ${isCenter ? 'z-10' : 'opacity-95 z-0'}`}
|
| 424 |
onClick={(e) => {
|
| 425 |
-
//
|
| 426 |
-
if (isCenter && !(e.target as HTMLElement).closest('button')
|
| 427 |
setPreviewVersionId(v.id);
|
| 428 |
setStage('preview');
|
| 429 |
}
|
|
@@ -436,18 +436,6 @@ 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 |
-
<button
|
| 440 |
-
type="button"
|
| 441 |
-
onClick={(e) => {
|
| 442 |
-
e.preventDefault();
|
| 443 |
-
e.stopPropagation();
|
| 444 |
-
setPreviewVersionId(v.id);
|
| 445 |
-
setStage('preview');
|
| 446 |
-
}}
|
| 447 |
-
className="inline-flex items-center justify-center gap-2 px-3 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 cursor-pointer"
|
| 448 |
-
>
|
| 449 |
-
Full Text
|
| 450 |
-
</button>
|
| 451 |
<button
|
| 452 |
type="button"
|
| 453 |
onClick={() => selectManual(v.id)}
|
|
@@ -469,22 +457,6 @@ const Refinity: React.FC = () => {
|
|
| 469 |
);
|
| 470 |
})}
|
| 471 |
</SwiperRoot>
|
| 472 |
-
|
| 473 |
-
{/* External button specifically for v2 when it's centered */}
|
| 474 |
-
{taskVersions[flowIndex]?.versionNumber === 2 && (
|
| 475 |
-
<div
|
| 476 |
-
onClick={() => {
|
| 477 |
-
setPreviewVersionId(taskVersions[flowIndex].id);
|
| 478 |
-
setStage('preview');
|
| 479 |
-
}}
|
| 480 |
-
className="absolute bottom-6 left-1/2 transform -translate-x-1/2 z-50"
|
| 481 |
-
>
|
| 482 |
-
<div className="inline-flex items-center justify-center gap-2 px-3 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 cursor-pointer">
|
| 483 |
-
Full Text
|
| 484 |
-
</div>
|
| 485 |
-
</div>
|
| 486 |
-
)}
|
| 487 |
-
|
| 488 |
{compareUIOpen && (
|
| 489 |
<div className="mt-4 p-3 rounded-2xl border border-gray-200 bg-white/60 backdrop-blur">
|
| 490 |
<div className="flex flex-col md:flex-row gap-3 md:items-end">
|
|
|
|
| 422 |
<div
|
| 423 |
className={`relative h-full rounded-2xl p-6 bg-white ring-1 ring-gray-200 shadow-xl text-base overflow-hidden flex flex-col ${isCenter ? 'z-10' : 'opacity-95 z-0'}`}
|
| 424 |
onClick={(e) => {
|
| 425 |
+
// Click handler for center card - only trigger if clicking outside buttons
|
| 426 |
+
if (isCenter && !(e.target as HTMLElement).closest('button')) {
|
| 427 |
setPreviewVersionId(v.id);
|
| 428 |
setStage('preview');
|
| 429 |
}
|
|
|
|
| 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 |
<button
|
| 440 |
type="button"
|
| 441 |
onClick={() => selectManual(v.id)}
|
|
|
|
| 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">
|