Upload folder using huggingface_hub
Browse files
client/src/components/Refinity.tsx
CHANGED
|
@@ -422,7 +422,17 @@ const Refinity: React.FC = () => {
|
|
| 422 |
}
|
| 423 |
return (
|
| 424 |
<SwiperSlide key={v.id} style={{ width: 'clamp(320px, 48vw, 720px)', height: isFullscreen ? '72vh' : '62.4vh' }}>
|
| 425 |
-
<div
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 426 |
<div className={`ref-card-overlay absolute inset-0 rounded-2xl opacity-40 [background:linear-gradient(to_bottom,rgba(255,255,255,0.45),rgba(255,255,255,0)_28%),linear-gradient(to_right,rgba(255,255,255,0.35),rgba(255,255,255,0)_28%)]`} />
|
| 427 |
<div className={`ref-card-overlay absolute inset-0 rounded-2xl bg-gradient-to-tr from-white/30 via-white/10 to-transparent opacity-30`} />
|
| 428 |
<div className="text-gray-800 text-sm mb-2">Original: {v.originalAuthor}</div>
|
|
@@ -432,12 +442,29 @@ const Refinity: React.FC = () => {
|
|
| 432 |
<div className="mt-4 flex gap-3">
|
| 433 |
<button
|
| 434 |
type="button"
|
| 435 |
-
onClick={() => {
|
|
|
|
|
|
|
| 436 |
console.log('Full Text clicked for version:', v.versionNumber, 'id:', v.id, 'isCenter:', isCenter, 'flowIndex:', flowIndex);
|
| 437 |
setPreviewVersionId(v.id);
|
| 438 |
setStage('preview');
|
| 439 |
-
}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 440 |
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"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 441 |
>
|
| 442 |
Full Text
|
| 443 |
</button>
|
|
|
|
| 422 |
}
|
| 423 |
return (
|
| 424 |
<SwiperSlide key={v.id} style={{ width: 'clamp(320px, 48vw, 720px)', height: isFullscreen ? '72vh' : '62.4vh' }}>
|
| 425 |
+
<div
|
| 426 |
+
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'}`}
|
| 427 |
+
onClick={(e) => {
|
| 428 |
+
// Fallback click handler for center card - only trigger if clicking outside buttons
|
| 429 |
+
if (isCenter && !(e.target as HTMLElement).closest('button')) {
|
| 430 |
+
console.log('Fallback click on center card for version:', v.versionNumber);
|
| 431 |
+
setPreviewVersionId(v.id);
|
| 432 |
+
setStage('preview');
|
| 433 |
+
}
|
| 434 |
+
}}
|
| 435 |
+
>
|
| 436 |
<div className={`ref-card-overlay absolute inset-0 rounded-2xl opacity-40 [background:linear-gradient(to_bottom,rgba(255,255,255,0.45),rgba(255,255,255,0)_28%),linear-gradient(to_right,rgba(255,255,255,0.35),rgba(255,255,255,0)_28%)]`} />
|
| 437 |
<div className={`ref-card-overlay absolute inset-0 rounded-2xl bg-gradient-to-tr from-white/30 via-white/10 to-transparent opacity-30`} />
|
| 438 |
<div className="text-gray-800 text-sm mb-2">Original: {v.originalAuthor}</div>
|
|
|
|
| 442 |
<div className="mt-4 flex gap-3">
|
| 443 |
<button
|
| 444 |
type="button"
|
| 445 |
+
onClick={(e) => {
|
| 446 |
+
e.preventDefault();
|
| 447 |
+
e.stopPropagation();
|
| 448 |
console.log('Full Text clicked for version:', v.versionNumber, 'id:', v.id, 'isCenter:', isCenter, 'flowIndex:', flowIndex);
|
| 449 |
setPreviewVersionId(v.id);
|
| 450 |
setStage('preview');
|
| 451 |
+
}}
|
| 452 |
+
onMouseDown={(e) => {
|
| 453 |
+
e.preventDefault();
|
| 454 |
+
e.stopPropagation();
|
| 455 |
+
console.log('Full Text mousedown for version:', v.versionNumber);
|
| 456 |
+
}}
|
| 457 |
+
onMouseUp={(e) => {
|
| 458 |
+
e.preventDefault();
|
| 459 |
+
e.stopPropagation();
|
| 460 |
+
console.log('Full Text mouseup for version:', v.versionNumber);
|
| 461 |
+
}}
|
| 462 |
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"
|
| 463 |
+
style={{
|
| 464 |
+
pointerEvents: 'auto',
|
| 465 |
+
zIndex: 9999,
|
| 466 |
+
position: 'relative'
|
| 467 |
+
}}
|
| 468 |
>
|
| 469 |
Full Text
|
| 470 |
</button>
|