1
0
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:
RaidMax
2019-08-10 17:35:34 -05:00
parent c2b5aed8cd
commit d5cece04f7
3 changed files with 21 additions and 23 deletions

View File

@ -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);