auth cookie expires after 30 days
only check hit offset when distance > 3 meters fix null reference on unauthorized user fixed stats not showing on profile if anticheat disabled server client history turns red server is unresponsive
This commit is contained in:
@ -6,12 +6,14 @@
|
||||
const actionType = $(this).data('action');
|
||||
$.get('/Action/' + actionType + 'Form')
|
||||
.done(function (response) {
|
||||
$('#actionModal .modal-body').html(response);
|
||||
$('#actionModal .modal-message').fadeOut('fast');
|
||||
$('#actionModal .modal-body-content').html(response);
|
||||
$('#actionModal').modal();
|
||||
})
|
||||
.fail(function (jqxhr, textStatus, error) {
|
||||
$('#actionModal .modal-body').html('<span class="text-danger">' + error + '</span>');
|
||||
$('#actionModal .modal-message').text('Error &mdash ' + error);
|
||||
$('#actionModal').modal();
|
||||
$('#actionModal .modal-message').fadeIn('fast');
|
||||
});
|
||||
});
|
||||
|
||||
@ -29,18 +31,22 @@
|
||||
location.reload();
|
||||
}
|
||||
else {
|
||||
$('#actionModal .modal-body').html(response);
|
||||
$('#actionModal .modal-message').fadeOut('fast');
|
||||
$('#actionModal .modal-body-content').html(response);
|
||||
$('#actionModal').modal();
|
||||
}
|
||||
})
|
||||
.fail(function (jqxhr, textStatus, error) {
|
||||
if (jqxhr.status == 401) {
|
||||
$('#actionModal .modal-body').removeClass('text-danger');
|
||||
$('#actionModal .modal-body').prepend('<div class="text-danger mb-3">Invalid login credentials</div>');
|
||||
if ($('#actionModal .modal-message').text.length > 0) {
|
||||
$('#actionModal .modal-message').fadeOut('fast');
|
||||
}
|
||||
if (jqxhr.status === 401) {
|
||||
$('#actionModal .modal-message').text('Invalid login credentials');
|
||||
}
|
||||
else {
|
||||
$('#actionModal .modal-body').html('<span class="text-danger">Error — ' + error + '</span>');
|
||||
$('#actionModal .modal-message').text('Error — ' + error);
|
||||
}
|
||||
$('#actionModal .modal-message').fadeIn('fast');
|
||||
});
|
||||
});
|
||||
});
|
@ -1,4 +1,4 @@
|
||||
function getPlayerHistoryChart(playerHistory, i, width) {
|
||||
function getPlayerHistoryChart(playerHistory, i, width, color) {
|
||||
///////////////////////////////////////
|
||||
// thanks to canvasjs :(
|
||||
playerHistory.forEach(function (item, i) {
|
||||
@ -6,7 +6,7 @@
|
||||
});
|
||||
|
||||
return new CanvasJS.Chart(`server_history_${i}`, {
|
||||
backgroundColor: "#191919",
|
||||
backgroundColor: '#191919',
|
||||
height: 100,
|
||||
width: width,
|
||||
animationEnabled: true,
|
||||
@ -41,7 +41,7 @@
|
||||
data: [{
|
||||
showInLegend: false,
|
||||
type: "splineArea",
|
||||
color: "rgba(0, 122, 204, 0.432)",
|
||||
color: color,
|
||||
markerSize: 0,
|
||||
dataPoints: playerHistory
|
||||
}]
|
||||
@ -53,8 +53,9 @@ var charts = {};
|
||||
$('.server-history-row').each(function (index, element) {
|
||||
let clientHistory = $(this).data('clienthistory');
|
||||
let serverId = $(this).data('serverid');
|
||||
let color = $(this).data('online') === 'True' ? '#007acc' : '#ff6060'
|
||||
let width = $('.server-header').first().width();
|
||||
let historyChart = getPlayerHistoryChart(clientHistory, serverId, width);
|
||||
let historyChart = getPlayerHistoryChart(clientHistory, serverId, width, color);
|
||||
historyChart.render();
|
||||
charts[serverId] = historyChart;
|
||||
});
|
||||
|
Reference in New Issue
Block a user