diff --git a/WebfrontCore/Views/Client/Profile/Index.cshtml b/WebfrontCore/Views/Client/Profile/Index.cshtml index a367581cc..fba09b709 100644 --- a/WebfrontCore/Views/Client/Profile/Index.cshtml +++ b/WebfrontCore/Views/Client/Profile/Index.cshtml @@ -23,7 +23,7 @@
-
+
@@ -35,6 +35,14 @@ @if (ViewBag.Authorized) { +
+
+
+
+
+
@foreach (var linked in Model.LinkedAccounts) { diff --git a/WebfrontCore/wwwroot/js/profile.js b/WebfrontCore/wwwroot/js/profile.js index 8e555ea3a..ba442b0c4 100644 --- a/WebfrontCore/wwwroot/js/profile.js +++ b/WebfrontCore/wwwroot/js/profile.js @@ -1,7 +1,7 @@ $(document).ready(function () { - /* - Expand alias tab if they have any - */ + /* + Expand alias tab if they have any + */ $('#profile_aliases_btn').click(function (e) { const aliases = $('#profile_aliases').text().trim(); if (aliases && aliases.length !== 0) { @@ -10,6 +10,14 @@ } }); + const ipAddresses = $('.ip-lookup-profile'); + $.each(ipAddresses, function (index, address) { + $.get('http://ip-api.com/json/' + $(address).data('ip'), function (result) { + const country = result['country']; + $('#ip_lookup_country').text(country) + }); + }); + /* set the end time for initial event query */ startAt = $('.loader-data-time').last().data('time'); @@ -35,7 +43,7 @@ $(this).children().filter('.client-message-prefix').removeClass('oi-chevron-right'); $(this).children().filter('.client-message-prefix').addClass('oi-chevron-bottom'); - + $.get('/Stats/GetMessageAsync', { 'serverId': $(this).data('serverid'), 'when': $(this).data('when') @@ -102,7 +110,7 @@ $('#mainModal .modal-body').append(response.city); } if (response.region.length > 0) { - $('#mainModal .modal-body').append((response.city.length > 0 ? ', ' : '') + response.region); + $('#mainModal .modal-body').append((response.city.length > 0 ? ', ' : '') + response.region); } if (response.country.length > 0) { $('#mainModal .modal-body').append((response.country.length > 0 ? ', ' : '') + response.country);