Added active playtime to quick overview on player page

This commit is contained in:
Rsl1122 2018-04-06 10:23:06 +03:00
parent 5c60558422
commit 8922541191
2 changed files with 6 additions and 0 deletions

View File

@ -154,6 +154,8 @@ public class InspectPage extends Page {
long afkWeek = PlayerProfile.getAFKTime(sessionsWeek.stream());
long afkMonth = PlayerProfile.getAFKTime(sessionsMonth.stream());
long activeTotal = playtime - afk;
long longestSession = PlayerProfile.getLongestSession(allSessions.stream());
long longestSessionDay = PlayerProfile.getLongestSession(sessionsDay.stream());
long longestSessionWeek = PlayerProfile.getLongestSession(sessionsWeek.stream());
@ -179,6 +181,8 @@ public class InspectPage extends Page {
addValue("playtimeWeek", playtimeWeek > 0L ? FormatUtils.formatTimeAmount(playtimeWeek) : "-");
addValue("playtimeMonth", playtimeMonth > 0L ? FormatUtils.formatTimeAmount(playtimeMonth) : "-");
addValue("activeTotal", activeTotal > 0L ? FormatUtils.formatTimeAmount(activeTotal) : "-");
addValue("afkTotal", afk > 0L ? FormatUtils.formatTimeAmount(afk) : "-");
addValue("afkDay", afkDay > 0L ? FormatUtils.formatTimeAmount(afkDay) : "-");
addValue("afkWeek", afkWeek > 0L ? FormatUtils.formatTimeAmount(afkWeek) : "-");

View File

@ -292,6 +292,8 @@
class="pull-right"><b>${sessionCount}</b></span></p>
<p><i class="col-green fa fa-clock-o"></i> Total Playtime <span
class="pull-right">${playtimeTotal}</span></p>
<p><i class="col-green fa fa-clock-o"></i> Total Active <span
class="pull-right">${activeTotal}</span></p>
<p><i class="col-grey fa fa-clock-o"></i> Total AFK <span
class="pull-right">${afkTotal}</span></p>
<p><i class="col-teal fa fa-clock-o"></i> Longest Session <span