Browse Source

Adjust video history carousel controls

feature/create-task
Luckyu_js 1 week ago
parent
commit
1fdd4671d0
  1. 16
      src/components/nodes/GenerateVideoNode.tsx

16
src/components/nodes/GenerateVideoNode.tsx

@ -681,33 +681,33 @@ export function GenerateVideoNodeView({ id, data, selected, suppressEmptyStateDe
</svg> </svg>
</div> </div>
)} )}
{/* Carousel controls - overlaid on video bottom */} {/* Carousel controls sit at the vertical center so the player toolbar remains usable. */}
{hasCarouselVideos && ( {hasCarouselVideos && (
<div className="absolute bottom-0 left-0 right-0 flex items-center justify-center gap-2 py-1.5 bg-neutral-900/80"> <>
<button <button
onClick={handleCarouselPrevious} onClick={handleCarouselPrevious}
disabled={isLoadingCarouselVideo} disabled={isLoadingCarouselVideo}
className="w-5 h-5 rounded hover:bg-white/10 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center text-white/70 hover:text-white transition-colors" className="nodrag nopan absolute left-2 top-1/2 z-20 flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-full text-white/85 drop-shadow-[0_1px_3px_rgba(0,0,0,0.75)] transition-colors hover:bg-white/15 hover:text-white disabled:cursor-not-allowed disabled:opacity-50"
title="Previous video" title="Previous video"
> >
<svg className="w-3 h-3" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}> <svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
<path strokeLinecap="round" strokeLinejoin="round" d="M15 19l-7-7 7-7" /> <path strokeLinecap="round" strokeLinejoin="round" d="M15 19l-7-7 7-7" />
</svg> </svg>
</button> </button>
<span className="text-[10px] text-white/70 min-w-[32px] text-center"> <span className="pointer-events-none absolute left-1/2 top-2 z-20 min-w-[36px] -translate-x-1/2 rounded-full bg-neutral-950/55 px-2 py-0.5 text-center text-[10px] text-white/75 shadow-lg backdrop-blur-sm">
{(nodeData.selectedVideoHistoryIndex || 0) + 1} / {(nodeData.videoHistory || []).length} {(nodeData.selectedVideoHistoryIndex || 0) + 1} / {(nodeData.videoHistory || []).length}
</span> </span>
<button <button
onClick={handleCarouselNext} onClick={handleCarouselNext}
disabled={isLoadingCarouselVideo} disabled={isLoadingCarouselVideo}
className="w-5 h-5 rounded hover:bg-white/10 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center text-white/70 hover:text-white transition-colors" className="nodrag nopan absolute right-2 top-1/2 z-20 flex h-8 w-8 -translate-y-1/2 items-center justify-center rounded-full text-white/85 drop-shadow-[0_1px_3px_rgba(0,0,0,0.75)] transition-colors hover:bg-white/15 hover:text-white disabled:cursor-not-allowed disabled:opacity-50"
title="Next video" title="Next video"
> >
<svg className="w-3 h-3" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}> <svg className="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" strokeWidth={2}>
<path strokeLinecap="round" strokeLinejoin="round" d="M9 5l7 7-7 7" /> <path strokeLinecap="round" strokeLinejoin="round" d="M9 5l7 7-7 7" />
</svg> </svg>
</button> </button>
</div> </>
)} )}
</> </>
) : ( ) : (

Loading…
Cancel
Save