mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-09-19 10:11:02 +02:00
Fixed a bug with the theme
This commit is contained in:
parent
8dd7d9615f
commit
0a5eda1fc8
@ -73,12 +73,15 @@ public class Theme {
|
||||
if (Verify.equalsOne(value, defaultValue)) {
|
||||
continue;
|
||||
}
|
||||
if (!value.contains("url")) {
|
||||
replaced = replaced.replace(defaultValue, value);
|
||||
} else {
|
||||
if (value.contains("url")) {
|
||||
String[] colorAndUrl = value.split(" ");
|
||||
replaced = replaced.replace("background: " + defaultValue, "background: " + colorAndUrl[1]);
|
||||
replaced = replaced.replace(defaultValue, colorAndUrl[0]);
|
||||
if (colorAndUrl.length >= 2) {
|
||||
replaced = replaced.replace("background: " + defaultValue, "background: " + colorAndUrl[1]);
|
||||
replaced = replaced.replace(defaultValue, colorAndUrl[0]);
|
||||
return replaced;
|
||||
}
|
||||
} else {
|
||||
replaced = replaced.replace(defaultValue, value);
|
||||
}
|
||||
}
|
||||
return replaced;
|
||||
|
@ -28,7 +28,7 @@ public enum ThemeVal {
|
||||
GREEN("Colors.green", "#4CAF50"),
|
||||
LIGHT_GREEN("Colors.light-green", "#8BC34A"),
|
||||
LIME("Colors.lime", "#CDDC39"),
|
||||
YELLOW("Colors.yellow", "#FFEB3B"),
|
||||
YELLOW("Colors.yellow", "#ffe821"),
|
||||
AMBER("Colors.amber", "#FFC107"),
|
||||
ORANGE("Colors.orange", "#FF9800"),
|
||||
DEEP_ORANGE("Colors.deep-orange", "#FF5722"),
|
||||
|
@ -22,7 +22,7 @@ Colors:
|
||||
green: "#4CAF50"
|
||||
light-green: "#8BC34A"
|
||||
lime: "#CDDC39"
|
||||
yellow: "#FFEB3B"
|
||||
yellow: "#ffe821"
|
||||
amber: "#FFC107"
|
||||
orange: "#FF9800"
|
||||
deep-orange: "#FF5722"
|
||||
|
Loading…
Reference in New Issue
Block a user