mirror of
https://github.com/Frooodle/Stirling-PDF.git
synced 2025-11-16 01:21:16 +01:00
feat(convert): update CBR settings and fix input handling
- Renamed `data-testid` in `ConvertToCbrSettings` to `cbr-output-settings` - Refined `onChange` handler in `ConvertToCbrSettings` to ensure valid numeric value - Standardized quote style in `ConvertFromCbrSettings` imports Signed-off-by: Balázs Szücs <bszucs1209@gmail.com>
This commit is contained in:
parent
ef7f7755be
commit
af949d184d
@ -1,5 +1,5 @@
|
||||
import { Stack, Text, Checkbox } from '@mantine/core';
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { ConvertParameters } from "@app/hooks/tools/convert/useConvertParameters";
|
||||
|
||||
interface ConvertFromCbrSettingsProps {
|
||||
|
||||
@ -16,17 +16,17 @@ const ConvertToCbrSettings = ({
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<Stack gap="sm" data-testid="cbr-output-options-section">
|
||||
<Stack gap="sm" data-testid="cbr-output-settings">
|
||||
<Text size="sm" fw={500}>{t("convert.cbrOutputOptions", "PDF to CBR Options")}:</Text>
|
||||
|
||||
<NumberInput
|
||||
data-testid="cbr-dpi-input"
|
||||
label={t("convert.cbrDpi", "DPI for image rendering")}
|
||||
value={parameters.pdfToCbrOptions.dpi}
|
||||
onChange={(value) => onParameterChange('pdfToCbrOptions', {
|
||||
...parameters.pdfToCbrOptions,
|
||||
dpi: typeof value === 'number' ? value : 150
|
||||
})}
|
||||
onChange={(val) =>
|
||||
typeof val === 'number' &&
|
||||
onParameterChange('pdfToCbrOptions', { ...parameters.pdfToCbrOptions, dpi: val })
|
||||
}
|
||||
min={72}
|
||||
max={600}
|
||||
step={50}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user