Merge pull request #1751 from danielyxie/dev

fix some coloring stuff
This commit is contained in:
hydroflame 2021-11-19 23:55:21 -05:00 committed by GitHub
commit ac74d6a46b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -134,16 +134,16 @@ function LogWindow(props: IProps): React.ReactElement {
}
function lineClass(s: string): string {
if (s.startsWith("ERROR") || s.startsWith("FAIL")) {
if (s.match(/\[[^\]]+\] ERROR/) || s.match(/\[[^\]]+\] FAIL/)) {
return classes.error;
}
if (s.startsWith("SUCCESS")) {
if (s.match(/\[[^\]]+\] SUCCESS/)) {
return classes.success;
}
if (s.startsWith("WARN")) {
if (s.match(/\[[^\]]+\] WARN/)) {
return classes.warning;
}
if (s.startsWith("INFO")) {
if (s.match(/\[[^\]]+\] INFO/)) {
return classes.info;
}
return classes.primary;