pull/982/head
Mikael Finstad 2022-02-13 22:57:47 +08:00
rodzic 5607fda8df
commit 42d3a8981a
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 25AB36E3E81CBC26
2 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -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>

Wyświetl plik

@ -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;