Made calendars use theme.yml values

This commit is contained in:
Rsl1122 2018-04-07 11:26:23 +03:00
parent b357fd4948
commit 8c2feb312c
2 changed files with 10 additions and 6 deletions

View File

@ -6,6 +6,8 @@ package com.djrapitops.plan.utilities.html.graphs.calendar;
import com.djrapitops.plan.data.container.PlayerKill; import com.djrapitops.plan.data.container.PlayerKill;
import com.djrapitops.plan.data.container.Session; import com.djrapitops.plan.data.container.Session;
import com.djrapitops.plan.system.settings.theme.Theme;
import com.djrapitops.plan.system.settings.theme.ThemeVal;
import com.djrapitops.plan.utilities.FormatUtils; import com.djrapitops.plan.utilities.FormatUtils;
import com.djrapitops.plugin.api.TimeAmount; import com.djrapitops.plugin.api.TimeAmount;
@ -51,7 +53,7 @@ public class PlayerCalendar {
series.append(",{title: 'Playtime: ").append(FormatUtils.formatTimeAmount(playtime)) series.append(",{title: 'Playtime: ").append(FormatUtils.formatTimeAmount(playtime))
.append("',start:'").append(day) .append("',start:'").append(day)
.append("',color: '#4CAF50'") .append("',color: '").append(Theme.getValue(ThemeVal.GREEN)).append("'")
.append("}"); .append("}");
series.append(",{title: 'Sessions: ").append(sessionCount) series.append(",{title: 'Sessions: ").append(sessionCount)
@ -88,7 +90,7 @@ public class PlayerCalendar {
series.append(",{title: 'Killed: ").append(kill.getVictim()) series.append(",{title: 'Killed: ").append(kill.getVictim())
.append("',start:").append(time) .append("',start:").append(time)
.append(",end:").append(time + fiveMinutes) .append(",end:").append(time + fiveMinutes)
.append(",color: 'red'") .append(",color: '").append(Theme.getValue(ThemeVal.RED)).append("'")
.append("}"); .append("}");
} }
} }
@ -98,6 +100,6 @@ public class PlayerCalendar {
String registered = FormatUtils.formatTimeStampYear(this.registered); String registered = FormatUtils.formatTimeStampYear(this.registered);
series.append("{title: 'Registered: ").append(registered).append("'," + series.append("{title: 'Registered: ").append(registered).append("'," +
"start: ").append(this.registered).append(",color: '#8BC34A'}"); "start: ").append(this.registered).append(",color: '").append(Theme.getValue(ThemeVal.LIGHT_GREEN)).append("'}");
} }
} }

View File

@ -5,6 +5,8 @@
package com.djrapitops.plan.utilities.html.graphs.calendar; package com.djrapitops.plan.utilities.html.graphs.calendar;
import com.djrapitops.plan.data.container.Session; import com.djrapitops.plan.data.container.Session;
import com.djrapitops.plan.system.settings.theme.Theme;
import com.djrapitops.plan.system.settings.theme.ThemeVal;
import com.djrapitops.plan.utilities.FormatUtils; import com.djrapitops.plan.utilities.FormatUtils;
import java.util.*; import java.util.*;
@ -43,7 +45,7 @@ public class ServerCalendar {
series.append(",{title: 'New: ").append(newPlayers) series.append(",{title: 'New: ").append(newPlayers)
.append("',start:'").append(day) .append("',start:'").append(day)
.append("',color: '#8BC34A'") .append("',color: '").append(Theme.getValue(ThemeVal.LIGHT_GREEN)).append("'")
.append("}"); .append("}");
} }
@ -62,12 +64,12 @@ public class ServerCalendar {
series.append(",{title: 'Playtime: ").append(FormatUtils.formatTimeAmount(playtime)) series.append(",{title: 'Playtime: ").append(FormatUtils.formatTimeAmount(playtime))
.append("',start:'").append(day) .append("',start:'").append(day)
.append("',color: '#4CAF50'") .append("',color: '").append(Theme.getValue(ThemeVal.GREEN)).append("'")
.append("}"); .append("}");
series.append(",{title: 'Sessions: ").append(sessionCount) series.append(",{title: 'Sessions: ").append(sessionCount)
.append("',start:'").append(day) .append("',start:'").append(day)
.append("',color: '#009688'") .append("',color: '").append(Theme.getValue(ThemeVal.TEAL)).append("'")
.append("}"); .append("}");
series.append(",{title: 'Unique: ").append(uniquePlayers) series.append(",{title: 'Unique: ").append(uniquePlayers)