aboutsummaryrefslogtreecommitdiff
path: root/client-web/source/user/mod.ts
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2023-09-07 20:24:21 +0200
committermetamuffin <metamuffin@disroot.org>2023-09-07 20:24:21 +0200
commitf5fa4f7d58344c2dc722d1f37c1d7a008f6ee9b3 (patch)
treec7ac2a7497670745c73f927abf264d63a5a4805d /client-web/source/user/mod.ts
parent2d0761b8932f11b01e241e2db3a8f08250efe878 (diff)
downloadkeks-meet-f5fa4f7d58344c2dc722d1f37c1d7a008f6ee9b3.tar
keks-meet-f5fa4f7d58344c2dc722d1f37c1d7a008f6ee9b3.tar.bz2
keks-meet-f5fa4f7d58344c2dc722d1f37c1d7a008f6ee9b3.tar.zst
new element creation helper
Diffstat (limited to 'client-web/source/user/mod.ts')
-rw-r--r--client-web/source/user/mod.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/client-web/source/user/mod.ts b/client-web/source/user/mod.ts
index 93042ca..67b3cd5 100644
--- a/client-web/source/user/mod.ts
+++ b/client-web/source/user/mod.ts
@@ -5,7 +5,7 @@
*/
/// <reference lib="dom" />
-import { ediv, epre, espan } from "../helper.ts";
+import { e } from "../helper.ts";
import { Room } from "../room.ts";
export class User {
@@ -14,12 +14,12 @@ export class User {
get name() { return this._name }
get display_name() { return this.name ?? "Unknown" }
- name_el = espan(this.display_name)
- stats_el = epre("")
- el = ediv({ class: "user" })
+ name_el = e("span", {}, this.display_name)
+ stats_el = e("pre", {})
+ el = e("div", { class: "user" })
constructor(public room: Room, public id: number) {
- const info_el = ediv({ class: "info" })
+ const info_el = e("div", { class: "info" })
this.name_el.textContent = this.display_name
this.name_el.classList.add("name")
info_el.append(this.name_el, this.stats_el)