diff --git a/src/HelpSheet.jsx b/src/HelpSheet.jsx index 025f3c90..1086c66c 100644 --- a/src/HelpSheet.jsx +++ b/src/HelpSheet.jsx @@ -37,8 +37,8 @@ const HelpSheet = ({
  • E Cut (export selection in the same directory)
  • C Capture snapshot (in the same directory)
  • + Add cut segment
  • -
  • D Delete source file
  • BACKSPACE Remove current cut segment
  • +
  • D Delete source file
  • Hover mouse over buttons to see which function they have.

    diff --git a/src/renderer.jsx b/src/renderer.jsx index ef3a2966..5924e37a 100644 --- a/src/renderer.jsx +++ b/src/renderer.jsx @@ -1207,7 +1207,6 @@ const App = memo(() => { } const { - segBgColor: currentSegBgColor, segActiveBgColor: currentSegActiveBgColor, segBorderColor: currentSegBorderColor, } = getSegColors(currentCutSeg); @@ -1465,6 +1464,37 @@ const App = memo(() => { ); } + const getSegButtonStyle = ({ segActiveBgColor, segBorderColor }) => ({ background: segActiveBgColor, border: `2px solid ${segBorderColor}`, borderRadius: 6, color: 'white', fontSize: 14, textAlign: 'center', lineHeight: '11px', fontWeight: 'bold' }); + const curSegButtonStyle = getSegButtonStyle({ + segActiveBgColor: currentSegActiveBgColor, + segBorderColor: currentSegBorderColor, + }); + + function renderJumpCutpointButton(direction) { + const newIndex = currentSegIndexSafe + direction; + const seg = cutSegments[newIndex]; + + let segButtonStyle; + + if (seg) { + const { segActiveBgColor, segBorderColor } = getSegColors(seg); + segButtonStyle = getSegButtonStyle({ segActiveBgColor, segBorderColor }); + } else { + segButtonStyle = getSegButtonStyle({ segActiveBgColor: 'rgba(255,255,255,0.3)', segBorderColor: 'rgba(255,255,255,0.5)' }); + } + + return ( +
    0 ? 'next' : 'previous'} segment (${newIndex + 1})`} + onClick={() => seg && setCurrentSegIndex(newIndex)} + > + {newIndex + 1} +
    + ); + } + const primaryColor = 'hsl(194, 78%, 47%)'; const AutoMergeIcon = autoMerge ? MdCallMerge : MdCallSplit; @@ -1711,6 +1741,8 @@ const App = memo(() => { onClick={() => seekAbs(0)} /> + {renderJumpCutpointButton(-1)} + {renderSetCutpointButton('start')}
    @@ -1758,6 +1790,8 @@ const App = memo(() => { {renderSetCutpointButton('end')} + {renderJumpCutpointButton(1)} + { />