From e3d056a8807d52f95b7df9537ce931925b00d98f Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 24 Jun 2023 22:06:34 +0200 Subject: rework ui design, broke a lot of stuff --- client-web/source/user/mod.ts | 3 +-- client-web/source/user/remote.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'client-web/source/user') diff --git a/client-web/source/user/mod.ts b/client-web/source/user/mod.ts index e83c2e6..6bd177a 100644 --- a/client-web/source/user/mod.ts +++ b/client-web/source/user/mod.ts @@ -6,7 +6,6 @@ /// import { ediv, epre, espan } from "../helper.ts"; -import { ROOM_CONTAINER } from "../index.ts"; import { Room } from "../room.ts"; export class User { @@ -25,6 +24,6 @@ export class User { this.name_el.classList.add("name") info_el.append(this.name_el, this.stats_el) this.el.append(info_el) - ROOM_CONTAINER.append(this.el) + room.element.append(this.el) } } \ No newline at end of file diff --git a/client-web/source/user/remote.ts b/client-web/source/user/remote.ts index 5e81cf7..907dd50 100644 --- a/client-web/source/user/remote.ts +++ b/client-web/source/user/remote.ts @@ -7,7 +7,6 @@ import { RelayMessage } from "../../../common/packets.d.ts"; import { notify } from "../helper.ts"; -import { ROOM_CONTAINER } from "../index.ts" import { log } from "../logger.ts" import { PREFS } from "../preferences/mod.ts"; import { new_remote_resource, RemoteResource } from "../resource/mod.ts"; @@ -79,7 +78,7 @@ export class RemoteUser extends User { log("usermodel", `remove remote user: ${this.display_name}`) this.pc.close() this.room.remote_users.delete(this.id) - ROOM_CONTAINER.removeChild(this.el) + this.room.element.removeChild(this.el) if (PREFS.notify_leave) notify(`${this.display_name} left`) } on_relay(message: RelayMessage) { -- cgit v1.2.3-70-g09d2