aboutsummaryrefslogtreecommitdiff
path: root/webAO/client
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2026-04-06 16:22:55 +0200
committerGitHub <noreply@github.com>2026-04-06 16:22:55 +0200
commit815f56add06b92a48b964cb1343f70c86ea36435 (patch)
tree99ef56a333dbb419ccadfcaac2cbbc94a8d3df1d /webAO/client
parent8c8a4a478a233764b7ca31bd39ebfdd2954a2a46 (diff)
parent6f407b54c3251b90463bc508852b031d72b0c673 (diff)
Merge pull request #298 from AttorneyOnline/reconnect
Add reconnect UI
Diffstat (limited to 'webAO/client')
-rw-r--r--webAO/client/appendICNotice.ts10
-rw-r--r--webAO/client/handleBans.ts3
2 files changed, 11 insertions, 2 deletions
diff --git a/webAO/client/appendICNotice.ts b/webAO/client/appendICNotice.ts
new file mode 100644
index 0000000..29065db
--- /dev/null
+++ b/webAO/client/appendICNotice.ts
@@ -0,0 +1,10 @@
+/**
+ * Appends a notice (hrtext divider) to the IC log.
+ * @param {string} msg the notice text
+ */
+export function appendICNotice(msg: string) {
+ const el = document.createElement("div");
+ el.className = "hrtext";
+ el.textContent = msg;
+ document.getElementById("client_log")!.appendChild(el);
+}
diff --git a/webAO/client/handleBans.ts b/webAO/client/handleBans.ts
index 9eec9be..004b27e 100644
--- a/webAO/client/handleBans.ts
+++ b/webAO/client/handleBans.ts
@@ -6,10 +6,9 @@ import { safeTags } from "../encoding";
* @param {string} reason why
*/
export const handleBans = (type: string, reason: string) => {
- document.getElementById("client_error")!.style.display = "flex";
+ document.getElementById("client_error_overlay")!.style.display = "flex";
document.getElementById("client_errortext")!.innerHTML =
`${type}:<br>${safeTags(reason).replace(/\n/g, "<br />")}`;
(<HTMLElement>document.getElementById("client_reconnect")).style.display =
"none";
- alert(type + ":\r" + reason);
};