diff --git a/src/ui/React/LogBoxManager.tsx b/src/ui/React/LogBoxManager.tsx index 08d5e2586..7f608a020 100644 --- a/src/ui/React/LogBoxManager.tsx +++ b/src/ui/React/LogBoxManager.tsx @@ -19,6 +19,7 @@ import { findRunningScript } from "../../Script/ScriptHelpers"; import { Player } from "../../Player"; import { debounce } from "lodash"; import { Settings } from "../../Settings/Settings"; +import { ANSIITypography } from "./ANSIITypography"; let layerCounter = 0; @@ -185,20 +186,20 @@ function LogWindow(props: IProps): React.ReactElement { setMinimized(!minimized); } - function lineColor(s: string): string { + function lineColor(s: string): "error" | "success" | "warn" | "info" | "primary" { if (s.match(/(^\[[^\]]+\] )?ERROR/) || s.match(/(^\[[^\]]+\] )?FAIL/)) { - return Settings.theme.error; + return "error"; } if (s.match(/(^\[[^\]]+\] )?SUCCESS/)) { - return Settings.theme.success; + return "success"; } if (s.match(/(^\[[^\]]+\] )?WARN/)) { - return Settings.theme.warning; + return "warn"; } if (s.match(/(^\[[^\]]+\] )?INFO/)) { - return Settings.theme.info; + return "info"; } - return Settings.theme.primary; + return "primary"; } // And trigger fakeDrag when the window is resized @@ -319,10 +320,10 @@ function LogWindow(props: IProps): React.ReactElement { {script.logs.map( (line: string, i: number): JSX.Element => ( - - {line} + +
-
+ ), )}