diff --git a/Plan/common/src/main/java/com/djrapitops/plan/system/json/PlayerJSONParser.java b/Plan/common/src/main/java/com/djrapitops/plan/system/json/PlayerJSONParser.java index 0aa82c848..bac529e06 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/system/json/PlayerJSONParser.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/system/json/PlayerJSONParser.java @@ -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("-")); diff --git a/Plan/common/src/main/resources/assets/plan/web/css/sb-admin-2.css b/Plan/common/src/main/resources/assets/plan/web/css/sb-admin-2.css index 61ef0537b..070eefaee 100644 --- a/Plan/common/src/main/resources/assets/plan/web/css/sb-admin-2.css +++ b/Plan/common/src/main/resources/assets/plan/web/css/sb-admin-2.css @@ -171,10 +171,10 @@ a:hover { } .fc-title { - color: #fff; + color: #eee; } -.fc-title { +.fc-time { color: #eee; } diff --git a/Plan/common/src/main/resources/assets/plan/web/js/color-selector.js b/Plan/common/src/main/resources/assets/plan/web/js/color-selector.js index 88f1777f1..188c59f5d 100644 --- a/Plan/common/src/main/resources/assets/plan/web/js/color-selector.js +++ b/Plan/common/src/main/resources/assets/plan/web/js/color-selector.js @@ -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}' + ''); // Turn bright tables to dark $('.table').addClass('table-dark'); diff --git a/Plan/common/src/main/resources/assets/plan/web/js/player-values.js b/Plan/common/src/main/resources/assets/plan/web/js/player-values.js index 8e9441f3a..0c1df0639 100644 --- a/Plan/common/src/main/resources/assets/plan/web/js/player-values.js +++ b/Plan/common/src/main/resources/assets/plan/web/js/player-values.js @@ -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); diff --git a/Plan/common/src/main/resources/assets/plan/web/player.html b/Plan/common/src/main/resources/assets/plan/web/player.html index 20fc38222..3721fb06e 100644 --- a/Plan/common/src/main/resources/assets/plan/web/player.html +++ b/Plan/common/src/main/resources/assets/plan/web/player.html @@ -183,7 +183,7 @@

Sessions

Longest Session

+ class="float-right" id="data_longest_session_length">

Session Median