start work to allow custom accent colors
This commit is contained in:
@ -55,7 +55,8 @@ $('.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 color = $(this).data('online') === 'True' ? 'rgba(0, 122, 204, 0.432)' : '#ff6060';
|
||||
let primaryColor = document.documentElement.style.getPropertyValue('--primary');
|
||||
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();
|
||||
|
@ -20,6 +20,8 @@
|
||||
if (interval < 1)
|
||||
interval = 1;
|
||||
|
||||
let primaryColor = document.documentElement.style.getPropertyValue('--primary');
|
||||
|
||||
return new CanvasJS.Chart(id, {
|
||||
backgroundColor: 'transparent',
|
||||
height: height,
|
||||
@ -55,7 +57,7 @@
|
||||
},
|
||||
data: [{
|
||||
type: 'splineArea',
|
||||
color: 'rgba(0, 122, 204, 0.25)',
|
||||
color: primaryColor.endsWith('80') ? primaryColor : primaryColor + '40',
|
||||
markerSize: 3.5,
|
||||
dataPoints: fixedData
|
||||
}]
|
||||
|
Reference in New Issue
Block a user