servername,captca,timestamp,reserve resources

This commit is contained in:
2026-04-22 19:47:38 +03:00
parent f4016b4431
commit 020e0026db
5 changed files with 76 additions and 18 deletions

View File

@@ -8,6 +8,11 @@ window.fetchTowns = async function() {
window.towns = await res.json();
window.renderTowns();
window.updateServerStatus(true);
// Automatically select the first town if none is selected
if (!window.selectedTownId && window.towns && window.towns.length > 0) {
window.selectTown(window.towns[0].town_id);
}
if (window.selectedTownId) {
window.renderBuildQueuePreview();
@@ -45,7 +50,9 @@ window.fetchLog = async function() {
try {
const res = await fetch('/dashboard/commands?player_id=' + window.PLAYER_ID);
const cmds = await res.json();
window.cmds = cmds; // Save globally so viewer can see reserved resources
window.renderLog(cmds);
if (window.selectedTownId) window.renderTownDetails();
} catch (e) {}
};