1
0
mirror of https://github.com/mifi/lossless-cut.git synced 2024-11-23 19:02:58 +01:00

remove trash icon in chapters mode

#2157
This commit is contained in:
Mikael Finstad 2024-09-27 11:50:53 +02:00
parent c7baea3649
commit 55c728761e
No known key found for this signature in database
GPG Key ID: 25AB36E3E81CBC26

View File

@ -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={{
@ -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>
);
}