linguabot commited on
Commit
843152d
·
verified ·
1 Parent(s): 92d01b4

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. client/src/components/Refinity.tsx +8 -5
client/src/components/Refinity.tsx CHANGED
@@ -399,8 +399,8 @@ const Refinity: React.FC = () => {
399
  spaceBetween={24}
400
  preventClicks={false}
401
  preventClicksPropagation={false}
402
- noSwiping={false}
403
- noSwipingClass={undefined}
404
  breakpoints={{
405
  640: { spaceBetween: 28 },
406
  1024: { spaceBetween: 32 },
@@ -410,7 +410,7 @@ const Refinity: React.FC = () => {
410
  observeParents
411
  grabCursor
412
  coverflowEffect={{ rotate: 0, stretch: 0, depth: 80, modifier: 1, slideShadows: false }}
413
- className="mySwiper !px-4 overflow-visible pb-10"
414
  style={{ height: isFullscreen ? 'calc(100vh - 96px)' : 'min(76vh, calc(100vh - 220px))', minHeight: '340px' }}
415
  >
416
  {taskVersions.map((v, idx) => {
@@ -426,8 +426,8 @@ const Refinity: React.FC = () => {
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="ref-action-bar mt-4 flex gap-3 relative z-20">
430
- <button type="button" onClick={()=>{ setPreviewVersionId(v.id); setStage('preview'); }} className="relative overflow-hidden 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">Full Text</button>
431
  <button type="button" onClick={()=>selectManual(v.id)} className="relative overflow-hidden 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">Revise</button>
432
  <button type="button" onClick={()=>{ setCompareUIOpen(true); if (!compareA) setCompareA(v.id); }} className="relative overflow-hidden 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">Compare</button>
433
  </div>
@@ -521,6 +521,9 @@ const Refinity: React.FC = () => {
521
  .mySwiper .swiper-slide-active { z-index: 50 !important; }
522
  /* Active slide receives pointer events; non-active decorative overlays ignore events */
523
  .mySwiper .swiper-slide:not(.swiper-slide-active) .ref-card-overlay { pointer-events: none; }
 
 
 
524
  ` }} />
525
  </div>
526
  {compareModalOpen && (
 
399
  spaceBetween={24}
400
  preventClicks={false}
401
  preventClicksPropagation={false}
402
+ noSwiping={true}
403
+ noSwipingClass={'swiper-no-swiping'}
404
  breakpoints={{
405
  640: { spaceBetween: 28 },
406
  1024: { spaceBetween: 32 },
 
410
  observeParents
411
  grabCursor
412
  coverflowEffect={{ rotate: 0, stretch: 0, depth: 80, modifier: 1, slideShadows: false }}
413
+ className="mySwiper !px-4 overflow-visible pb-2"
414
  style={{ height: isFullscreen ? 'calc(100vh - 96px)' : 'min(76vh, calc(100vh - 220px))', minHeight: '340px' }}
415
  >
416
  {taskVersions.map((v, idx) => {
 
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="ref-action-bar mt-4 flex gap-3 relative z-20 swiper-no-swiping">
430
+ <button type="button" onClick={(e)=>{ e.preventDefault(); e.stopPropagation(); setPreviewVersionId(v.id); setStage('preview'); }} className="relative overflow-hidden 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">Full Text</button>
431
  <button type="button" onClick={()=>selectManual(v.id)} className="relative overflow-hidden 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">Revise</button>
432
  <button type="button" onClick={()=>{ setCompareUIOpen(true); if (!compareA) setCompareA(v.id); }} className="relative overflow-hidden 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">Compare</button>
433
  </div>
 
521
  .mySwiper .swiper-slide-active { z-index: 50 !important; }
522
  /* Active slide receives pointer events; non-active decorative overlays ignore events */
523
  .mySwiper .swiper-slide:not(.swiper-slide-active) .ref-card-overlay { pointer-events: none; }
524
+ /* Do not let pagination/arrows steal clicks from active slide action bar */
525
+ .mySwiper .swiper-pagination, .mySwiper .swiper-button-prev, .mySwiper .swiper-button-next { pointer-events: none; }
526
+ .mySwiper .swiper-slide-active .ref-action-bar, .mySwiper .swiper-slide-active .ref-action-bar * { pointer-events: auto; }
527
  ` }} />
528
  </div>
529
  {compareModalOpen && (