+
+
@if (Model.LevelInt < (int)ViewBag.User.Level && !Model.HasActivePenalty)
{
@@ -74,6 +77,7 @@
}
}
+
@if (Model.LevelInt != -1)
{
diff --git a/WebfrontCore/Views/Server/_ClientActivity.cshtml b/WebfrontCore/Views/Server/_ClientActivity.cshtml
index 5e8e355d0..558f2c742 100644
--- a/WebfrontCore/Views/Server/_ClientActivity.cshtml
+++ b/WebfrontCore/Views/Server/_ClientActivity.cshtml
@@ -17,15 +17,27 @@
if (Model.ChatHistory[i].Message == "CONNECTED")
{
-
@Model.ChatHistory[i].Name
+
+
+
+
}
if (Model.ChatHistory[i].Message == "DISCONNECTED")
{
-
@Model.ChatHistory[i].Name
+
+
+
+
}
if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED")
{
-
@Model.ChatHistory[i].Name — @Model.ChatHistory[i].Message.Substring(0, Math.Min(65, Model.ChatHistory[i].Message.Length))
+
+
+
+
+ —
+
+
}
}
}
@@ -83,12 +95,17 @@
if (Model.ChatHistory[i].Message == "CONNECTED")
{
-
@Model.ChatHistory[i].Name
+
+
+
+
}
if (Model.ChatHistory[i].Message == "DISCONNECTED")
{
-
-
@Model.ChatHistory[i].Name
+
+
+
+
}
if (Model.ChatHistory[i].Message != "CONNECTED" && Model.ChatHistory[i].Message != "DISCONNECTED")
{
diff --git a/WebfrontCore/wwwroot/css/main.scss b/WebfrontCore/wwwroot/css/main.scss
index d04b78dae..73e8156e5 100644
--- a/WebfrontCore/wwwroot/css/main.scss
+++ b/WebfrontCore/wwwroot/css/main.scss
@@ -302,7 +302,7 @@ form *, select {
}
.text-color-code-58 {
- animation: color-change 60s infinite;
+ animation: color-change 54s infinite;
}
@keyframes color-change {
diff --git a/WebfrontCore/wwwroot/js/action.js b/WebfrontCore/wwwroot/js/action.js
index 857847de5..d0061e95a 100644
--- a/WebfrontCore/wwwroot/js/action.js
+++ b/WebfrontCore/wwwroot/js/action.js
@@ -42,6 +42,7 @@ $(document).ready(function () {
$('#actionModal').trigger('action_form_received', actionType);
})
.fail(function (jqxhr, textStatus, error) {
+ $('#actionModal .modal-body-content').html('');
$('#actionModal .modal-message').text('Error — ' + error);
$('#actionModal').modal();
$('#actionModal .modal-message').fadeIn('fast');
@@ -54,6 +55,7 @@ $(document).ready(function () {
$(document).on('submit', '.action-form', function (e) {
e.preventDefault();
$(this).append($('#target_id input'));
+ $('#actionModal').data('should-refresh', $('#actionModal').find('.refreshable').length !== 0);
const data = $(this).serialize();
showLoader();
$.get($(this).attr('action') + '/?' + data)
@@ -102,4 +104,15 @@ $(document).ready(function () {
});
}
});
+
+ /*
+ * handle close event to refresh if need be
+ */
+ $("#actionModal").on("hidden.bs.modal", function () {
+ let shouldRefresh = $(this).data('should-refresh');
+
+ if (shouldRefresh !== undefined && shouldRefresh) {
+ location.reload();
+ }
+ });
});
\ No newline at end of file
diff --git a/WebfrontCore/wwwroot/js/loader.js b/WebfrontCore/wwwroot/js/loader.js
index aa7610e0c..f8f26769f 100644
--- a/WebfrontCore/wwwroot/js/loader.js
+++ b/WebfrontCore/wwwroot/js/loader.js
@@ -41,9 +41,19 @@ function loadMoreItems() {
loaderOffset += loadCount;
}
+var hasScrollBar = false;
+
function _ScrollHandler(e) {
//throttle event:
+ /*
+ https://stackoverflow.com/questions/3898130/check-if-a-user-has-scrolled-to-the-bottom
+ */
+ var $window = $(window);
+ var $document = $(document);
hasScrollBar = true;
+ let _throttleTimer = null;
+ let _throttleDelay = 100;
+
clearTimeout(_throttleTimer);
_throttleTimer = setTimeout(function () {
@@ -69,18 +79,10 @@ function setupListeners() {
}
});
- /*
- https://stackoverflow.com/questions/3898130/check-if-a-user-has-scrolled-to-the-bottom
- */
- var _throttleTimer = null;
- var _throttleDelay = 100;
- var $window = $(window);
- var $document = $(document);
- var hasScrollBar = false;
- $document.ready(function () {
- $window
+ $(document).ready(function () {
+ $(window)
.off('scroll', _ScrollHandler)
.on('scroll', _ScrollHandler);
$('.loader-load-more:not(.disabled)').click(function (e) {
diff --git a/WebfrontCore/wwwroot/js/server.js b/WebfrontCore/wwwroot/js/server.js
index 913cd5634..187566edc 100644
--- a/WebfrontCore/wwwroot/js/server.js
+++ b/WebfrontCore/wwwroot/js/server.js
@@ -80,7 +80,7 @@ function refreshClientActivity() {
cache: false
})
.done(function (response) {
- const clientCount = $(response).find('.col-6 span').length;
+ const clientCount = $(response).find('a').length;
$('#server_header_' + serverId + ' .server-clientcount').text(clientCount);
$('#server_clientactivity_' + serverId).html(response);
})
diff --git a/WebfrontCore/wwwroot/js/stats.js b/WebfrontCore/wwwroot/js/stats.js
index 71714b33c..85b6ac653 100644
--- a/WebfrontCore/wwwroot/js/stats.js
+++ b/WebfrontCore/wwwroot/js/stats.js
@@ -20,7 +20,7 @@
if (interval < 1)
interval = 1;
- let primaryColor = window.getComputedStyle(document.body).getPropertyValue('--primary').trim();
+ //let primaryColor = $('.nav-tabs .nav-link.active').first().css('background-color')
return new CanvasJS.Chart(id, {
backgroundColor: 'transparent',
@@ -56,10 +56,11 @@
dockInsidePlotArea: true
},
data: [{
- type: 'splineArea',
- color: primaryColor.endsWith('80') ? primaryColor : primaryColor + '40',
- markerSize: 3.5,
- dataPoints: fixedData
+ type: 'spline',
+ color: '#c0c0c0',
+ markerSize: 0,
+ dataPoints: fixedData,
+ lineThickness: 2
}]
});
}
diff --git a/version.txt b/version.txt
index c6f222934..62a76413d 100644
--- a/version.txt
+++ b/version.txt
@@ -4,6 +4,7 @@ Version 2.4:
-added recently connected players dropdown option on webfront
-added "dashboard" to home view with quick stats
-added ability to customize accent color and branding on webfront
+-added flag button to client profile
-hid flagged status of users on webfront unless logged in
Version 2.3: