Made Text configurable

This commit is contained in:
genuineparts 2025-02-16 21:49:16 +01:00
parent 8e2bb1666d
commit d9dc23c524
3 changed files with 9 additions and 5 deletions

2
.idea/encodings.xml generated
View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<component name="Encoding" defaultCharsetForPropertiesFiles="UTF-8">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>

View file

@ -11,6 +11,10 @@ apiserver {
textcolorupdate = "grey"
textcolornotrun = "orange"
bgcolornotrun = "black"
textok = "On Time"
texterror = "FEHLER!"
textcancelled = "AUSFALL!"
textnotrun = "F&auml;hrt heute nicht"
monitors {
monitor1 {

View file

@ -164,18 +164,18 @@ public class Main {
if(zeit > 0 && zeit < 9999){
Monitor.put("data",zeit);
} else if(zeit == 9999) {
Monitor.put("data","AUSFALL!");
Monitor.put("data",conf.getString("textcancelled"));
} else if(zeit == -1) {
Monitor.put("data","Fehler!");
Monitor.put("data",conf.getString("texterror"));
} else {
Monitor.put("data","Fährt heute nicht");
Monitor.put("data",conf.getString("textnotrun"));
Monitor.put("color",conf.getString("textcolornotrun"));
Monitor.put("background",conf.getString("bgcolornotrun"));
}
} else {
Monitor.put("color",conf.getString("textcolor"));
Monitor.put("data","On time");
Monitor.put("data",conf.getString("textok"));
Monitor.put("background",conf.getString("bgcolor"));
}
}