diff --git a/frontend/public/locales/en-GB/translation.json b/frontend/public/locales/en-GB/translation.json index f15c927ac..a405edb7c 100644 --- a/frontend/public/locales/en-GB/translation.json +++ b/frontend/public/locales/en-GB/translation.json @@ -1596,13 +1596,18 @@ }, "auto": { "header": "Auto Redact", + "settings": "Redaction Settings", "colorLabel": "Colour", - "textsToRedactLabel": "Text to Redact (line-separated)", - "textsToRedactPlaceholder": "e.g. \nConfidential \nTop-Secret", + "wordsToRedact": { + "title": "Words to Redact", + "placeholder": "Enter a word", + "addAnother": "Add Another", + "examples": "Examples: Confidential, Top-Secret" + }, "useRegexLabel": "Use Regex", "wholeWordSearchLabel": "Whole Word Search", "customPaddingLabel": "Custom Extra Padding", - "convertPDFToImageLabel": "Convert PDF to PDF-Image (Used to remove text behind the box)" + "convertPDFToImageLabel": "Convert PDF to PDF-Image" }, "manual": { "header": "Manual Redaction", diff --git a/frontend/src/components/tools/redact/AutomaticRedactSettings.tsx b/frontend/src/components/tools/redact/AutomaticRedactSettings.tsx index cfc2fc01f..a724b0407 100644 --- a/frontend/src/components/tools/redact/AutomaticRedactSettings.tsx +++ b/frontend/src/components/tools/redact/AutomaticRedactSettings.tsx @@ -1,6 +1,7 @@ -import { Stack, Text, Textarea, Select, NumberInput, Divider } from "@mantine/core"; +import { Stack, Divider, Text, NumberInput, Group, ColorInput } from "@mantine/core"; import { useTranslation } from "react-i18next"; import { RedactParameters } from "../../../hooks/tools/redact/useRedactParameters"; +import WordsToRedactInput from "./WordsToRedactInput"; interface AutomaticRedactSettingsProps { parameters: RedactParameters; @@ -11,61 +12,53 @@ interface AutomaticRedactSettingsProps { const AutomaticRedactSettings = ({ parameters, onParameterChange, disabled = false }: AutomaticRedactSettingsProps) => { const { t } = useTranslation(); - const colorOptions = [ - { value: '#000000', label: t('black', 'Black') }, - { value: '#FFFFFF', label: t('white', 'White') }, - { value: '#FF0000', label: t('red', 'Red') }, - { value: '#00FF00', label: t('green', 'Green') }, - { value: '#0000FF', label: t('blue', 'Blue') }, - ]; - return ( - {/* Text to Redact */} - - - {t('redact.auto.textsToRedactLabel', 'Text to Redact (line-separated)')} - -