From 6f407b54c3251b90463bc508852b031d72b0c673 Mon Sep 17 00:00:00 2001 From: David Skoland Date: Sat, 28 Mar 2026 14:09:06 +0100 Subject: remove UI related changes --- webAO/dom/areaClick.ts | 7 +++++-- webAO/dom/renderAreaList.ts | 24 ------------------------ 2 files changed, 5 insertions(+), 26 deletions(-) delete mode 100644 webAO/dom/renderAreaList.ts (limited to 'webAO/dom') diff --git a/webAO/dom/areaClick.ts b/webAO/dom/areaClick.ts index 120ef39..27682c7 100644 --- a/webAO/dom/areaClick.ts +++ b/webAO/dom/areaClick.ts @@ -1,5 +1,4 @@ import { client } from "../client"; -import { appendICNotice } from "../client/appendICNotice"; import { renderPlayerList } from "./renderPlayerList"; /** * Triggered when an item on the area list is clicked. @@ -8,7 +7,11 @@ import { renderPlayerList } from "./renderPlayerList"; export function area_click(el: HTMLElement) { const area = client.areas[el.id.substring(4)].name; client.sender.sendMusicChange(area); - appendICNotice(`switched to ${el.textContent}`); + + const areaHr = document.createElement("div"); + areaHr.className = "hrtext"; + areaHr.textContent = `switched to ${el.textContent}`; + document.getElementById("client_log")!.appendChild(areaHr); client.area = Number(el.id.substring(4)); renderPlayerList(); } diff --git a/webAO/dom/renderAreaList.ts b/webAO/dom/renderAreaList.ts deleted file mode 100644 index e622765..0000000 --- a/webAO/dom/renderAreaList.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { client } from "../client"; -import { area_click } from "./areaClick"; - -export function renderAreaList() { - const container = document.getElementById("areas")!; - container.innerHTML = ""; - - for (let i = 0; i < client.areas.length; i++) { - const area = client.areas[i]; - const el = document.createElement("SPAN"); - el.className = `area-button area-${area.status.toLowerCase()}`; - el.id = `area${i}`; - el.innerText = `${area.name} (${area.players}) [${area.status}]`; - el.title = - `Players: ${area.players}\n` + - `Status: ${area.status}\n` + - `CM: ${area.cm}\n` + - `Area lock: ${area.locked}`; - el.onclick = function () { - area_click(el); - }; - container.appendChild(el); - } -} -- cgit