diff --git a/src/renderer/src/components/FileNameTemplateEditor.tsx b/src/renderer/src/components/FileNameTemplateEditor.tsx index 854011d4..4d22e836 100644 --- a/src/renderer/src/components/FileNameTemplateEditor.tsx +++ b/src/renderer/src/components/FileNameTemplateEditor.tsx @@ -132,14 +132,18 @@ function FileNameTemplateEditor(opts: { return ( -
{fileNames != null && (mergeMode ? t('Merged output file name:') : t('Output name(s):', { count: fileNames.length }))}
- {fileNames != null && ( - - {/* eslint-disable-next-line react/destructuring-assignment */} - {('currentSegIndexSafe' in opts ? fileNames[opts.currentSegIndexSafe] : undefined) || fileNames[0] || '-'} - {!needToShow && } - + <> +
{(mergeMode ? t('Merged output file name:') : t('Output name(s):', { count: fileNames.length }))}
+ +
+ + {/* eslint-disable-next-line react/destructuring-assignment */} + {('currentSegIndexSafe' in opts ? fileNames[opts.currentSegIndexSafe] : undefined) || fileNames[0] || '-'} + {!needToShow && } + +
+ )} @@ -147,7 +151,7 @@ function FileNameTemplateEditor(opts: {
{t('Output file name template')}:
@@ -169,29 +173,9 @@ function FileNameTemplateEditor(opts: { ))} - {problems.error != null && ( -
- {problems.error} -
- )} - - {problems.error == null && problems.sameAsInputFileNameWarning && ( -
- {' '} - {i18n.t('Output file name is the same as the source file name. This increases the risk of accidentally overwriting or deleting source files!')} -
- )} - - {isMissingExtension && ( -
- {' '} - {i18n.t('The file name template is missing {{ext}} and will result in a file without the suggested extension. This may result in an unplayable output file.', { ext: extVariableFormatted })} -
- )} - {hasTextNumericPaddedValue && (
- setOutputFileNameMinZeroPadding(parseInt(e.target.value, 10))} style={{ marginRight: '.5em', fontSize: '1em' }}> {Array.from({ length: 10 }).map((_v, i) => i + 1).map((v) => )} {t('Minimum numeric padded length')} @@ -207,6 +191,28 @@ function FileNameTemplateEditor(opts: { )} + + {problems.error != null ? ( +
+ {problems.error} +
+ ) : ( + <> + {problems.sameAsInputFileNameWarning && ( +
+ {' '} + {i18n.t('Output file name is the same as the source file name. This increases the risk of accidentally overwriting or deleting source files!')} +
+ )} + + {isMissingExtension && ( +
+ {' '} + {i18n.t('The file name template is missing {{ext}} and will result in a file without the suggested extension. This may result in an unplayable output file.', { ext: extVariableFormatted })} +
+ )} + + )} ); }