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:
2026-06-13 18:00:31 +02:00
co-authored by Copilot
parent 19c5247c90
commit 1bfca0d1e0
5 changed files with 9 additions and 5 deletions
+3 -1
View File
@@ -6,7 +6,7 @@ function ChatPage(params, container) {
var html =
'<div id="ChatController">' +
'<div id="chat-output" style="height:600px" class="Output scrollable"></div>' +
'<div id="chat-output" style="height:600px" class="Output scrollable text-white-50">Loading…</div>' +
'<form id="chat-form">' +
'<input id="chat-input" class="form-control" style="width:100%" placeholder="Type a message...">' +
'</form>' +
@@ -15,8 +15,10 @@ function ChatPage(params, container) {
var outputEl = document.getElementById('chat-output');
var inputEl = document.getElementById('chat-input');
var firstMessage = true;
function addMessage(msg) {
if (firstMessage) { outputEl.innerHTML = ''; outputEl.classList.remove('text-white-50'); firstMessage = false; }
var div = document.createElement('div');
var t = new Date((msg.Time || 0) * 1000);
var timeStr = t.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });