Fix download conversion setting input labels

This commit is contained in:
schroda
2025-07-26 00:46:42 +02:00
parent fcc68ce594
commit 20ca6d6cda
2 changed files with 4 additions and 8 deletions

View File

@@ -209,6 +209,7 @@
"compression_level": "Compression level",
"description": "In case no MIME-Type is defined, the \"default\" one will be used for the conversion.\nSet \"none\" as the target type to disable conversion for a MIME-Type",
"mime_type": "MIME-Type",
"target": "MIME-Type target",
"title": "Download conversion"
},
"delete_chapters": {

View File

@@ -137,7 +137,6 @@ const MimeTypeTextField = ({
};
const Conversion = ({
index,
shouldAutoFocusMimeTypeTextField,
conversion: { mimeType, target, compressionLevel },
setFocusMimeTypeTextField,
@@ -145,7 +144,6 @@ const Conversion = ({
isDuplicate,
}: {
shouldAutoFocusMimeTypeTextField: boolean;
index: number;
conversion: SettingsDownloadConversion;
setFocusMimeTypeTextField: (focus: boolean) => void;
onChange: (newConversion: SettingsDownloadConversion | null) => void;
@@ -159,8 +157,6 @@ const Conversion = ({
return (
<Stack
// eslint-disable-next-line react/no-array-index-key
key={`${mimeType}-${index}`}
sx={{
gap: 1,
flexDirection: 'row',
@@ -181,7 +177,7 @@ const Conversion = ({
shouldAutoFocus={shouldAutoFocusMimeTypeTextField}
isDefault={isDefault}
isDuplicate={isDuplicate}
label={t(isDefault ? 'global.label.default' : 'download.settings.conversion.mime_type')}
label={t('download.settings.conversion.mime_type')}
value={mimeType}
onUpdate={(value) => {
setFocusMimeTypeTextField(true);
@@ -198,7 +194,7 @@ const Conversion = ({
shouldAutoFocus={false}
isDefault={false}
isDuplicate={false}
label={t('download.settings.conversion.compression_level')}
label={t('download.settings.conversion.target')}
value={target}
onUpdate={(value) =>
onChange({
@@ -209,7 +205,7 @@ const Conversion = ({
}
/>
<TextField
label="Compression"
label={t('download.settings.conversion.compression_level')}
value={compressionLevel ?? ''}
type="number"
error={!isCompressionLevelValid}
@@ -299,7 +295,6 @@ export const DownloadConversionSetting = ({
key={`${mimeType}-${index}`}
conversion={conversion}
isDuplicate={isDuplicate}
index={index}
setFocusMimeTypeTextField={(focus) =>
setFocusedMimeTypeTextFieldIndex(focus ? index : DEFAULT_FOCUS_INDEX)
}