aboutsummaryrefslogtreecommitdiff
path: root/client-web/source/user
diff options
context:
space:
mode:
Diffstat (limited to 'client-web/source/user')
-rw-r--r--client-web/source/user/local.ts6
-rw-r--r--client-web/source/user/mod.ts10
2 files changed, 8 insertions, 8 deletions
diff --git a/client-web/source/user/local.ts b/client-web/source/user/local.ts
index 15c9390..a1d43bd 100644
--- a/client-web/source/user/local.ts
+++ b/client-web/source/user/local.ts
@@ -13,7 +13,7 @@ import { User } from "./mod.ts";
import { create_camera_res, create_mic_res, create_screencast_res } from "../resource/track.ts";
import { LocalResource } from "../resource/mod.ts";
import { PREFS } from "../preferences/mod.ts";
-import { ebutton } from "../helper.ts";
+import { e } from "../helper.ts";
export class LocalUser extends User {
resources: Map<string, LocalResource> = new Map()
@@ -66,14 +66,14 @@ export class LocalUser extends User {
r.el.classList.add("resource")
r.el.classList.add(`resource-${r.info.kind}`)
r.el.append(
- ebutton("Stop", {
+ e("button", {
onclick: () => {
r.destroy()
this.el.removeChild(r.el);
this.resources.delete(provide.id)
this.room.signaling.send_relay({ provide_stop: { id: provide.id } })
}
- }),
+ }, "Stop"),
)
}
}
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)