mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-30 00:50:25 -05:00
ui tweaks/improvements including recent players and ip info lookup
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
@import 'profile.scss';
|
||||
|
||||
:root {
|
||||
--blue-color: #007ACC;
|
||||
--blue-color: #117ac0;
|
||||
|
||||
--yellow-color: #fe7e4c;
|
||||
--yellow-color-dark: #fe7e4c88;
|
||||
@ -20,6 +20,8 @@
|
||||
--lm-card-bg-color: var(--gray-color-light);
|
||||
--gray-color-light: white;
|
||||
--card-border-width: 0;
|
||||
|
||||
--dm-modal-overlay-bg-color: rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
.server-history-row {
|
||||
|
@ -5,11 +5,15 @@
|
||||
.level-color-user, .level-color-guest, .level-color-0 {
|
||||
}
|
||||
|
||||
.level-bgcolor-user, .level-bgcolor-guest, .level-bgcolor-0 {
|
||||
.dark-mode .level-bgcolor-user, .dark-mode .level-bgcolor-guest, .dark-mode .level-bgcolor-0 {
|
||||
background-color: #6c757d !important;
|
||||
background-color: rgba(255, 255, 255, 0.68) !important;
|
||||
}
|
||||
|
||||
.level-bgcolor-user, .level-bgcolor-guest, .level-bgcolor-0 {
|
||||
background-color: var(--lm-base-body-bg-color) !important;
|
||||
}
|
||||
|
||||
.level-color-trusted, .level-color-2 {
|
||||
color: #749363 !important;
|
||||
color: rgba(116,147,99,1) !important;
|
||||
@ -188,10 +192,11 @@
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.ip-lookup-profile {
|
||||
.profile-country-flag {
|
||||
background-size: contain;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
height:5rem;
|
||||
}
|
||||
|
||||
.status-indicator {
|
||||
|
@ -1,11 +1,11 @@
|
||||
function hideLoader() {
|
||||
$('#mainLoadingBar').fadeOut();
|
||||
$('#modalLoadingBar').fadeOut();
|
||||
$('.modal-loading-bar').fadeOut();
|
||||
}
|
||||
|
||||
function showLoader() {
|
||||
$('#mainLoadingBar').fadeIn();
|
||||
$('#modalLoadingBar').fadeIn();
|
||||
$('.modal-loading-bar').fadeIn();
|
||||
}
|
||||
|
||||
function errorLoader() {
|
||||
@ -151,8 +151,13 @@ $(document).ready(function () {
|
||||
|
||||
catch{}
|
||||
|
||||
if (message instanceof Array)
|
||||
{
|
||||
message = message.join("<br/>");
|
||||
}
|
||||
|
||||
halfmoon.initStickyAlert({
|
||||
content: message.join("<br/>"),
|
||||
content: message,
|
||||
title: 'Error',
|
||||
alertType: 'alert-danger',
|
||||
fillType: 'filled'
|
||||
|
@ -55,36 +55,35 @@
|
||||
/*
|
||||
get ip geolocation info into modal
|
||||
*/
|
||||
$('.ip-locate-link').click(function (e) {
|
||||
e.preventDefault();
|
||||
$('.profile-ip-lookup').click(function (e) {
|
||||
const ip = $(this).data("ip");
|
||||
$.getJSON(`https://ipwhois.app/json/${ip}`)
|
||||
.done(function (response) {
|
||||
$('#mainModal .modal-title').text(ip);
|
||||
$('#mainModal .modal-body').text('');
|
||||
$('#contextModal .modal-title').text(ip);
|
||||
const modalBody = $('#contextModal .modal-body');
|
||||
modalBody.text('');
|
||||
if (response.isp.length > 0) {
|
||||
$('#mainModal .modal-body').append(`${_localization['WEBFRONT_PROFILE_LOOKUP_ISP']} — ${response.isp}<br/>`);
|
||||
modalBody.append(`${_localization['WEBFRONT_PROFILE_LOOKUP_ISP']} — <span class="text-muted">${response.isp}</span><br/>`);
|
||||
}
|
||||
if (response.org.length > 0) {
|
||||
$('#mainModal .modal-body').append(`${_localization['WEBFRONT_PROFILE_LOOKUP_ORG']} — ${response.org}<br/>`);
|
||||
modalBody.append(`${_localization['WEBFRONT_PROFILE_LOOKUP_ORG']} — <span class="text-muted">${response.org}</span><br/>`);
|
||||
}
|
||||
if (response.region.length > 0 || response.city.length > 0 || response.country.length > 0 || response.timezone_gmt.length > 0) {
|
||||
$('#mainModal .modal-body').append(`${_localization['WEBFRONT_PROFILE_LOOKUP_LOCATION']} — `);
|
||||
modalBody.append(`${_localization['WEBFRONT_PROFILE_LOOKUP_LOCATION']} —`);
|
||||
}
|
||||
if (response.city.length > 0) {
|
||||
$('#mainModal .modal-body').append(response.city);
|
||||
modalBody.append(`<span class="text-muted">${response.city}</span>`);
|
||||
}
|
||||
if (response.region.length > 0) {
|
||||
$('#mainModal .modal-body').append((response.region.length > 0 ? ', ' : '') + response.region);
|
||||
modalBody.append(`<span class="text-muted">${(response.region.length > 0 ? ', ' : '') + response.region}</span>`);
|
||||
}
|
||||
if (response.country.length > 0) {
|
||||
$('#mainModal .modal-body').append((response.country.length > 0 ? ', ' : '') + response.country);
|
||||
modalBody.append(`<span class="text-muted">${(response.country.length > 0 ? ', ' : '') + response.country}</span>`);
|
||||
}
|
||||
if (response.timezone_gmt.length > 0) {
|
||||
$('#mainModal .modal-body').append((response.timezone_gmt.length > 0 ? ', ' : '') + response.timezone_gmt);
|
||||
modalBody.append(`<br/>Timezone — <span class="text-muted">UTC${response.timezone_gmt}</span>`);
|
||||
}
|
||||
|
||||
$('#mainModal').modal();
|
||||
modalBody.append('</span>');
|
||||
})
|
||||
.fail(function (jqxhr, textStatus, error) {
|
||||
$('#mainModal .modal-title').text("Error");
|
||||
|
Reference in New Issue
Block a user