kopia lustrzana https://github.com/mifi/lossless-cut
improve logic
rodzic
5607fda8df
commit
42d3a8981a
|
@ -99,6 +99,8 @@ const ExportConfirm = memo(({
|
|||
|
||||
const willMerge = autoMerge && enabledOutSegments.length >= 2;
|
||||
|
||||
const canEditTemplate = !autoDeleteMergedSegments && !segmentsToChaptersOnly && enabledOutSegments.length >= 2;
|
||||
|
||||
// https://stackoverflow.com/questions/33454533/cant-scroll-to-top-of-flex-item-that-is-overflowing-container
|
||||
return (
|
||||
<AnimatePresence>
|
||||
|
@ -129,7 +131,7 @@ const ExportConfirm = memo(({
|
|||
<li>
|
||||
{t('Save output to path:')} <span role="button" onClick={changeOutDir} style={outDirStyle}>{outputDir}</span>
|
||||
</li>
|
||||
{!willMerge && !segmentsToChaptersOnly && (
|
||||
{canEditTemplate && (
|
||||
<li>
|
||||
<OutSegTemplateEditor filePath={filePath} helpIcon={outSegTemplateHelpIcon} outSegTemplate={outSegTemplate} setOutSegTemplate={setOutSegTemplate} generateOutSegFileNames={generateOutSegFileNames} currentSegIndexSafe={currentSegIndexSafe} isOutSegFileNamesValid={isOutSegFileNamesValid} safeOutputFileName={safeOutputFileName} toggleSafeOutputFileName={toggleSafeOutputFileName} />
|
||||
</li>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { memo } from 'react';
|
||||
import { Button } from 'evergreen-ui';
|
||||
import { BookmarkIcon, Button } from 'evergreen-ui';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { MdCallSplit, MdCallMerge } from 'react-icons/md';
|
||||
|
||||
|
@ -18,7 +18,8 @@ const MergeExportButton = memo(({ autoMerge, enabledOutSegments, setAutoMerge, a
|
|||
if (segmentsToChaptersOnly) {
|
||||
effectiveMode = 'sesgments_to_chapters';
|
||||
title = t('Chapters only');
|
||||
description = t('Don\'t cut the file, but instead create chapters from segments');
|
||||
AutoMergeIcon = BookmarkIcon;
|
||||
description = t('Don\'t cut the file, but instead export an unmodified original with segments as chapters');
|
||||
} else if (autoMerge && autoDeleteMergedSegments) {
|
||||
effectiveMode = 'merge';
|
||||
AutoMergeIcon = MdCallMerge;
|
||||
|
|
Ładowanie…
Reference in New Issue