diff --git a/public/locales/en/translations.json b/public/locales/en/translations.json index ef0fdf1..b5334bb 100644 --- a/public/locales/en/translations.json +++ b/public/locales/en/translations.json @@ -68,7 +68,12 @@ "Origin": "Origin", "Substitute": "Substitute" }, - "Exceptions": "Exceptions" + "Exceptions": { + "Label": "Exceptions", + "Definition": "Exceptions are used to inform the system to not replace the key in some sequences.", + "Keys": "Keys", + "Match": "Match" + } } }, "ReleaseNotes": { diff --git a/public/locales/ro/translations.json b/public/locales/ro/translations.json index 6659b2d..515c39b 100644 --- a/public/locales/ro/translations.json +++ b/public/locales/ro/translations.json @@ -59,7 +59,12 @@ "Origin": "Înlocuit", "Substitute": "Înlocuitor" }, - "Exceptions": "Excepții" + "Exceptions": { + "Label": "Excepții", + "Definition": "Excepțiile sunt folosite pentru a informa sistemul să nu înlocuiască cheia în unele secvențe.", + "Keys": "Chei", + "Match": "Potrivire" + } } }, "ReleaseNotes": { diff --git a/src/features/forwards/options/components/advanced/exceptions/ExceptionsCard.js b/src/features/forwards/options/components/advanced/exceptions/ExceptionsCard.js index 6f7f211..24371ae 100644 --- a/src/features/forwards/options/components/advanced/exceptions/ExceptionsCard.js +++ b/src/features/forwards/options/components/advanced/exceptions/ExceptionsCard.js @@ -3,17 +3,98 @@ import PropTypes from "prop-types"; import ExpandableCard from "../../../../../../components/common/ExpandableCard"; import { useTranslation } from "react-i18next"; import PriorityHighIcon from "@material-ui/icons/PriorityHigh"; +import { makeStyles } from "@material-ui/core/styles"; +import { + Table, + TableBody, + TableContainer, + TableHead, + TableRow, + Paper, + Typography, + Chip +} from "@material-ui/core"; +import styles from "../../../../../../components/common/styles/tableStyles"; +import { + StyledTableCell, + StyledTableRow +} from "../../../../../../components/common/MaterialTable"; +import PanToolIcon from "@material-ui/icons/PanTool"; + +const useStyles = makeStyles(styles); const ExceptionsCard = ({ exceptions }) => { + const classes = useStyles(); const { t } = useTranslation(); + const exceptionsInternal = exceptions.map(z => { + const result = { match: z.match }; + const keys = [...z.keys]; + if (z.key) { + keys.unshift(z.key); + } + result.keys = keys; + return result; + }); + return ( } iconVariant="rounded" - title={t("Forward.Options.Exceptions")} + title={t("Forward.Options.Exceptions.Label")} smallHeader - Content={
CONTENT...
} + Content={ + <> + + {t("Forward.Options.Exceptions.Definition")} + + + + + + + {t("Forward.Options.Exceptions.Keys")} + + + {t("Forward.Options.Exceptions.Match")} + + + + + <> + {exceptionsInternal.map(exception => { + return ( + + + {exception.keys.map(key => { + return ( + } + size="small" + label={key} + /> + ); + })} + + + {exception.match} + + + ); + })} + + +
+
+ + } /> ); };