!invertCutSegments && onClick(index)}
+ positionTransition
+ style={{ originY: 0, margin: '5px 0', border: `1px solid rgba(255,255,255,${isActive ? 1 : 0.3})`, padding: 5, borderRadius: 5, position: 'relative' }}
+ initial={{ scaleY: 0 }}
+ animate={{ scaleY: 1 }}
+ exit={{ scaleY: 0 }}
+ >
+
+ {renderNumber()}
+ {timeStr}
+
+ {seg.name}
+
+ {t('Duration')} {prettyMs(durationMs)}
+
+
+ ({Math.floor(durationMs)} ms, {getFrameCount(duration)} frames)
+
+
+ {isActive && (
+
+
+
+
+ )}
+
+ );
+});
+
const SegmentList = memo(({
formatTimecode, cutSegments, outSegments, getFrameCount, onSegClick,
currentSegIndex, invertCutSegments,
@@ -72,58 +125,6 @@ const SegmentList = memo(({
e.stopPropagation();
}
- const renderSegments = () => outSegments.map((seg, index) => {
- const duration = seg.end - seg.start;
- const durationMs = duration * 1000;
-
- const isActive = !invertCutSegments && currentSegIndex === index;
- const uuid = seg.uuid || `${seg.start}`;
-
- function renderNumber() {
- if (invertCutSegments) return