mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-26 09:33:49 +01:00
fix some coloring stuff
This commit is contained in:
parent
c88dade19a
commit
7255ce24ef
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 {
|
function lineClass(s: string): string {
|
||||||
if (s.startsWith("ERROR") || s.startsWith("FAIL")) {
|
if (s.match(/\[[^\]]+\] ERROR/) || s.match(/\[[^\]]+\] FAIL/)) {
|
||||||
return classes.error;
|
return classes.error;
|
||||||
}
|
}
|
||||||
if (s.startsWith("SUCCESS")) {
|
if (s.match(/\[[^\]]+\] SUCCESS/)) {
|
||||||
return classes.success;
|
return classes.success;
|
||||||
}
|
}
|
||||||
if (s.startsWith("WARN")) {
|
if (s.match(/\[[^\]]+\] WARN/)) {
|
||||||
return classes.warning;
|
return classes.warning;
|
||||||
}
|
}
|
||||||
if (s.startsWith("INFO")) {
|
if (s.match(/\[[^\]]+\] INFO/)) {
|
||||||
return classes.info;
|
return classes.info;
|
||||||
}
|
}
|
||||||
return classes.primary;
|
return classes.primary;
|
||||||
|
Loading…
Reference in New Issue
Block a user