linguabot commited on
Commit
be318bf
·
verified ·
1 Parent(s): 2b54ad2

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. client/src/components/Refinity.tsx +28 -30
client/src/components/Refinity.tsx CHANGED
@@ -425,41 +425,36 @@ const Refinity: React.FC = () => {
425
  <div className="text-gray-800 text-sm mb-2">Original: {v.originalAuthor}</div>
426
  <div className="text-gray-600 text-xs mb-3">Revised by: {v.revisedBy ? `${v.revisedBy} (v${v.versionNumber})` : `— (v${v.versionNumber})`}</div>
427
  <div className={`text-gray-900 whitespace-pre-wrap break-words leading-relaxed flex-1 overflow-hidden pr-1`}>{snippet}</div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  </div>
429
  </SwiperSlide>
430
  );
431
  })}
432
  </SwiperRoot>
433
-
434
- {/* Action buttons positioned outside Swiper to avoid event conflicts */}
435
- {taskVersions[flowIndex] && (
436
- <div className="absolute bottom-6 left-1/2 transform -translate-x-1/2 z-50">
437
- <div className="flex gap-3">
438
- <button
439
- type="button"
440
- onClick={() => { setPreviewVersionId(taskVersions[flowIndex].id); setStage('preview'); }}
441
- 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"
442
- >
443
- Full Text
444
- </button>
445
- <button
446
- type="button"
447
- onClick={() => selectManual(taskVersions[flowIndex].id)}
448
- 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"
449
- >
450
- Revise
451
- </button>
452
- <button
453
- type="button"
454
- onClick={() => { setCompareUIOpen(true); if (!compareA) setCompareA(taskVersions[flowIndex].id); }}
455
- 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"
456
- >
457
- Compare
458
- </button>
459
- </div>
460
- </div>
461
- )}
462
-
463
  {compareUIOpen && (
464
  <div className="mt-4 p-3 rounded-2xl border border-gray-200 bg-white/60 backdrop-blur">
465
  <div className="flex flex-col md:flex-row gap-3 md:items-end">
@@ -542,6 +537,9 @@ const Refinity: React.FC = () => {
542
  .mySwiper .swiper-button-prev, .mySwiper .swiper-button-next { top: 50% !important; transform: translateY(-50%); }
543
  .mySwiper .swiper-button-prev:after, .mySwiper .swiper-button-next:after { font-size: 18px; color: #94a3b8; }
544
  .mySwiper .swiper-pagination { bottom: 6px; }
 
 
 
545
  ` }} />
546
  </div>
547
  {compareModalOpen && (
 
425
  <div className="text-gray-800 text-sm mb-2">Original: {v.originalAuthor}</div>
426
  <div className="text-gray-600 text-xs mb-3">Revised by: {v.revisedBy ? `${v.revisedBy} (v${v.versionNumber})` : `— (v${v.versionNumber})`}</div>
427
  <div className={`text-gray-900 whitespace-pre-wrap break-words leading-relaxed flex-1 overflow-hidden pr-1`}>{snippet}</div>
428
+ {isCenter && (
429
+ <div className="mt-4 flex gap-3">
430
+ <button
431
+ type="button"
432
+ onClick={() => { setPreviewVersionId(v.id); setStage('preview'); }}
433
+ 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"
434
+ >
435
+ Full Text
436
+ </button>
437
+ <button
438
+ type="button"
439
+ onClick={() => selectManual(v.id)}
440
+ 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"
441
+ >
442
+ Revise
443
+ </button>
444
+ <button
445
+ type="button"
446
+ onClick={() => { setCompareUIOpen(true); if (!compareA) setCompareA(v.id); }}
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"
448
+ >
449
+ Compare
450
+ </button>
451
+ </div>
452
+ )}
453
  </div>
454
  </SwiperSlide>
455
  );
456
  })}
457
  </SwiperRoot>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
458
  {compareUIOpen && (
459
  <div className="mt-4 p-3 rounded-2xl border border-gray-200 bg-white/60 backdrop-blur">
460
  <div className="flex flex-col md:flex-row gap-3 md:items-end">
 
537
  .mySwiper .swiper-button-prev, .mySwiper .swiper-button-next { top: 50% !important; transform: translateY(-50%); }
538
  .mySwiper .swiper-button-prev:after, .mySwiper .swiper-button-next:after { font-size: 18px; color: #94a3b8; }
539
  .mySwiper .swiper-pagination { bottom: 6px; }
540
+ /* Ensure buttons inside slides are clickable */
541
+ .mySwiper .swiper-slide button { pointer-events: auto !important; position: relative; z-index: 10; }
542
+ .mySwiper .swiper-slide button:hover { transform: translateY(-0.5px); }
543
  ` }} />
544
  </div>
545
  {compareModalOpen && (