Skip to content

Commit

Permalink
remove trash icon in chapters mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mifi committed Sep 27, 2024
1 parent c7baea3 commit 55c7287
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/renderer/src/BetweenSegments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ import { FaTrashAlt, FaSave } from 'react-icons/fa';

import { mySpring } from './animations';
import { saveColor } from './colors';
import useUserSettings from './hooks/useUserSettings';


function BetweenSegments({ start, end, duration, invertCutSegments }: { start: number, end: number, duration: number, invertCutSegments: boolean }) {
const left = `${(start / duration) * 100}%`;

const { effectiveExportMode } = useUserSettings();

return (
<motion.div
style={{
Expand All @@ -31,12 +34,17 @@ function BetweenSegments({ start, end, duration, invertCutSegments }: { start: n
transition={mySpring}
>
<div style={{ flexGrow: 1, borderBottom: '1px dashed var(--gray10)', marginLeft: 5, marginRight: 5 }} />
{invertCutSegments ? (
<FaSave style={{ color: saveColor }} size={16} />
) : (
<FaTrashAlt style={{ color: 'var(--gray10)' }} size={16} />
{/* https://github.com/mifi/lossless-cut/issues/2157 */}
{effectiveExportMode !== 'segments_to_chapters' && (
<>
{invertCutSegments ? (
<FaSave style={{ color: saveColor }} size={16} />
) : (
<FaTrashAlt style={{ color: 'var(--gray10)' }} size={16} />
)}
<div style={{ flexGrow: 1, borderBottom: '1px dashed var(--gray10)', marginLeft: 5, marginRight: 5 }} />
</>
)}
<div style={{ flexGrow: 1, borderBottom: '1px dashed var(--gray10)', marginLeft: 5, marginRight: 5 }} />
</motion.div>
);
}
Expand Down

0 comments on commit 55c7287

Please sign in to comment.