Add formatting of Script and Verbose levels

Detect and colour the Script and Verbose levels.  The format of the
source file for the Script level is slightly different and needs an
update to the output parsing.
This commit is contained in:
Hornwitser committed 2020-11-09 15:57:46 +01:00
1 parent c8c65d2e92
commit db1f239a0f
5 files changed
+69 -4

No files matched your search

@@ -83,7 +83,11 @@ function formatOutputColored(output, key) {
let info = "";
if (output.type === "log") {
let level = output.level;
if (level === "Info") {
if (level === "Script") {
level = <span className="factorio-script">{level}</span>;
} else if (level === "Verbose") {
level = <span className="factorio-verbose">{level}</span>;
} else if (level === "Info") {
level = <span className="factorio-info">{level}</span>;
} else if (output.level === "Warning") {
level = <span className="factorio-warning">{level}</span>;
+10
View File
@@ -118,6 +118,16 @@ body {
color: #808080;
}
.instance-console .factorio-script {
font-weight: bold;
color: #49c33c;
}
.instance-console .factorio-verbose {
font-weight: bold;
color: #888888;
}
.instance-console .factorio-info {
font-weight: bold;
color: #4646ea;