fix: add loading indicators to all pages
- 'Loading…' shown in charts/fields/output areas while waiting for server response - Console + chat: clears loading state on first output line - Player list: table body shows loading row until refresh completes - Player info / Server info: fields show loading until data arrives Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+3
-1
@@ -4,7 +4,7 @@
|
||||
function ConsolePage(params, container) {
|
||||
var html =
|
||||
'<div id="ConsoleController">' +
|
||||
'<div id="console-output" style="height:600px" class="Output scrollable"></div>' +
|
||||
'<div id="console-output" style="height:600px" class="Output scrollable text-white-50">Loading…</div>' +
|
||||
'<form id="console-form">' +
|
||||
'<input type="text" id="console-input" class="form-control" autocomplete="off">' +
|
||||
'</form>' +
|
||||
@@ -15,8 +15,10 @@ function ConsolePage(params, container) {
|
||||
var inputEl = document.getElementById('console-input');
|
||||
var commandHistory = [];
|
||||
var historyIndex = 0;
|
||||
var firstOutput = true;
|
||||
|
||||
function addOutput(msg) {
|
||||
if (firstOutput) { outputEl.innerHTML = ''; outputEl.classList.remove('text-white-50'); firstOutput = false; }
|
||||
var div = document.createElement('div');
|
||||
div.className = msg.Type;
|
||||
div.textContent = stripHtml(msg.Message);
|
||||
|
||||
Reference in New Issue
Block a user