mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
have graph color generated by css so that MS Edge doesn't freak out when using rgba
don't do simple word check on offensive name
This commit is contained in:
@ -51,18 +51,6 @@
|
||||
}
|
||||
var charts = {};
|
||||
|
||||
$('.server-history-row').each(function (index, element) {
|
||||
let clientHistory = $(this).data('clienthistory');
|
||||
let serverId = $(this).data('serverid');
|
||||
let maxClients = parseInt($('#server_header_' + serverId + ' .server-maxclients').text());
|
||||
let primaryColor = window.getComputedStyle(document.body).getPropertyValue('--primary').trim();
|
||||
let color = $(this).data('online') === 'True' ? primaryColor.endsWith('80') ? primaryColor : primaryColor + '80' : '#ff6060';
|
||||
let width = $('.server-header').first().width();
|
||||
let historyChart = getPlayerHistoryChart(clientHistory, serverId, width, color, maxClients);
|
||||
historyChart.render();
|
||||
charts[serverId] = historyChart;
|
||||
});
|
||||
|
||||
$(window).resize(function () {
|
||||
$('.server-history-row').each(function (index) {
|
||||
let serverId = $(this).data('serverid');
|
||||
@ -94,6 +82,18 @@ $(document).ready(function () {
|
||||
$('.server-join-button').click(function (e) {
|
||||
$(this).children('.server-header-ip-address').show();
|
||||
});
|
||||
|
||||
$('.server-history-row').each(function (index, element) {
|
||||
let clientHistory = $(this).data('clienthistory');
|
||||
let serverId = $(this).data('serverid');
|
||||
let maxClients = parseInt($('#server_header_' + serverId + ' .server-maxclients').text());
|
||||
let primaryColor = $('style').css('background-color');
|
||||
let color = $(this).data('online') === 'True' ? primaryColor : '#ff6060';
|
||||
let width = $('.server-header').first().width();
|
||||
let historyChart = getPlayerHistoryChart(clientHistory, serverId, width, color, maxClients);
|
||||
historyChart.render();
|
||||
charts[serverId] = historyChart;
|
||||
});
|
||||
});
|
||||
|
||||
setInterval(refreshClientActivity, 2000);
|
||||
|
Reference in New Issue
Block a user