diff options
Diffstat (limited to 'webAO/client')
| -rw-r--r-- | webAO/client/appendICNotice.ts | 10 | ||||
| -rw-r--r-- | webAO/client/handleBans.ts | 3 |
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); }; |
