1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

finish custom accent color feature

This commit is contained in:
RaidMax
2019-07-27 15:23:45 -05:00
parent 75ce21597b
commit d1713882ac
11 changed files with 78 additions and 52 deletions

View File

@ -55,7 +55,7 @@ $('.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 = document.documentElement.style.getPropertyValue('--primary');
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);