mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-21 05:50:18 +08:00
Fixed things on player page:
- Unavailable ping (-1) - Longest session typo - Calendar color issues
This commit is contained in:
parent
49f8cedb3d
commit
e46ab76173
@ -168,9 +168,13 @@ public class PlayerJSONParser {
|
||||
info.put("activity_index_group", activityIndex.getGroup());
|
||||
UUID favoriteServer = perServer.favoriteServer();
|
||||
info.put("favorite_server", serverNames.getOrDefault(favoriteServer, favoriteServer.toString()));
|
||||
info.put("average_ping", decimals.apply(ping.average()) + " ms");
|
||||
info.put("worst_ping", ping.max() + " ms");
|
||||
info.put("best_ping", ping.min() + " ms");
|
||||
double averagePing = ping.average();
|
||||
int worstPing = ping.max();
|
||||
int bestPing = ping.min();
|
||||
|
||||
info.put("average_ping", averagePing != -1.0 ? decimals.apply(averagePing) + " ms" : "Unavailable");
|
||||
info.put("worst_ping", worstPing != -1.0 ? worstPing + " ms" : "Unavailable");
|
||||
info.put("best_ping", bestPing != -1.0 ? bestPing + " ms" : "Unavailable");
|
||||
info.put("registered", player.getValue(PlayerKeys.REGISTERED).map(year).orElse("-"));
|
||||
info.put("last_seen", player.getValue(PlayerKeys.LAST_SEEN).map(year).orElse("-"));
|
||||
|
||||
|
@ -171,10 +171,10 @@ a:hover {
|
||||
}
|
||||
|
||||
.fc-title {
|
||||
color: #fff;
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
.fc-title {
|
||||
.fc-time {
|
||||
color: #eee;
|
||||
}
|
||||
|
||||
|
@ -79,9 +79,9 @@
|
||||
'.card,.bg-white,.modal-content,.page-loader,hr {background-color:#44475a;border-color:#6272a4;}' +
|
||||
'.bg-white.collapse-inner {border 1px solid;}' +
|
||||
'.card-header {background-color:#44475a;border-color:#6272a4;}' +
|
||||
'#content,.col-black,.text-gray-800,.collapse-item,.modal-title,.modal-body,.page-loader,.close,.fc-title {color:#eee8d5 !important;}' +
|
||||
'#content,.col-black,.text-gray-800,.collapse-item,.modal-title,.modal-body,.page-loader,.close,.fc-title,.fc-time {color:#eee8d5 !important;}' +
|
||||
'.collapse-item:hover,.nav-link.active {background-color: #606270 !important;}' +
|
||||
'.fc-today {background:#6272a4 !important}' +
|
||||
'.fc-today {background:#646e8c !important}' +
|
||||
'</style>');
|
||||
// Turn bright tables to dark
|
||||
$('.table').addClass('table-dark');
|
||||
|
@ -21,7 +21,7 @@ function loadPlayerOverviewValues(json, error) {
|
||||
$(element).find("#data_active_playtime").text(data.active_playtime);
|
||||
$(element).find("#data_afk_time").text(data.afk_time);
|
||||
$(element).find("#data_session_count").text(data.session_count);
|
||||
$(element).find("#data_longest_session_lenght").text(data.longest_session_lenght);
|
||||
$(element).find("#data_longest_session_length").text(data.longest_session_length);
|
||||
$(element).find("#data_session_median").text(data.session_median);
|
||||
|
||||
$(element).find("#data_activity_index").text(data.activity_index);
|
||||
|
@ -183,7 +183,7 @@
|
||||
<p><i class="col-teal far fa-fw fa-calendar-check"></i> Sessions <span
|
||||
class="float-right"><b id="data_session_count"></b></span></p>
|
||||
<p><i class="col-teal far fa-fw fa-clock"></i> Longest Session <span
|
||||
class="float-right" id="data_longest_session_lenght"></span></p>
|
||||
class="float-right" id="data_longest_session_length"></span></p>
|
||||
<p><i class="col-teal far fa-fw fa-clock"></i> Session Median <span
|
||||
class="float-right" id="data_session_median"></span></p>
|
||||
<hr>
|
||||
|
Loading…
Reference in New Issue
Block a user