added debug

main
alex 2024-02-22 19:54:33 +01:00
parent 66e131c83a
commit 4467557dc7
3 changed files with 15 additions and 0 deletions

View File

@ -293,6 +293,7 @@
"card": { "card": {
"checkbox": { "checkbox": {
"info": "INFO", "info": "INFO",
"debug": "DEBUG",
"warning": "WARNUNG", "warning": "WARNUNG",
"error": "FEHLER" "error": "FEHLER"
} }

View File

@ -336,6 +336,7 @@
"card": { "card": {
"checkbox": { "checkbox": {
"info": "INFO", "info": "INFO",
"debug": "DEBUG",
"warning": "WARNING", "warning": "WARNING",
"error": "ERROR" "error": "ERROR"
} }

View File

@ -12,6 +12,7 @@ export default function LogCard({
}) { }) {
const { t } = useTranslation(); const { t } = useTranslation();
const [checkboxInfoChecked, setCheckboxInfoChecked] = useState(true); const [checkboxInfoChecked, setCheckboxInfoChecked] = useState(true);
const [checkboxDebugChecked, setCheckboxDebugChecked] = useState(true);
const [checkboxWarningChecked, setCheckboxWarningChecked] = useState(true); const [checkboxWarningChecked, setCheckboxWarningChecked] = useState(true);
const [checkboxErrorChecked, setCheckboxErrorChecked] = useState(true); const [checkboxErrorChecked, setCheckboxErrorChecked] = useState(true);
const virtuosoRef = useRef(); const virtuosoRef = useRef();
@ -128,6 +129,7 @@ export default function LogCard({
return ( return (
(checkboxInfoChecked && logType === "I") || (checkboxInfoChecked && logType === "I") ||
(checkboxDebugChecked && logType === "D") ||
(checkboxWarningChecked && logType === "W") || (checkboxWarningChecked && logType === "W") ||
(checkboxErrorChecked && logType === "E") (checkboxErrorChecked && logType === "E")
); );
@ -152,6 +154,15 @@ export default function LogCard({
{t("logCard.card.checkbox.info")} {t("logCard.card.checkbox.info")}
</Checkbox> </Checkbox>
</Col> </Col>
<Col>
<Checkbox
disabled={customResult !== undefined}
checked={checkboxDebugChecked}
onChange={(e) => setCheckboxDebugChecked(e.target.checked)}
>
{t("logCard.card.checkbox.debug")}
</Checkbox>
</Col>
<Col> <Col>
<Checkbox <Checkbox
disabled={customResult !== undefined} disabled={customResult !== undefined}
@ -206,6 +217,8 @@ export default function LogCard({
if (checkboxInfoChecked && logType === "I") { if (checkboxInfoChecked && logType === "I") {
color = "#44bd32"; color = "#44bd32";
} else if (checkboxDebugChecked && logType === "D") {
color = "#9b59b6";
} else if (checkboxWarningChecked && logType === "W") { } else if (checkboxWarningChecked && logType === "W") {
color = "#e67e22"; color = "#e67e22";
} else if (checkboxErrorChecked && logType === "E") { } else if (checkboxErrorChecked && logType === "E") {