From 91259369b2b87eb647e9743c874d7e58894149c1 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 27 Jan 2024 19:59:39 +0100 Subject: handle room joins without page reload. --- client-web/source/room_watches.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'client-web/source/room_watches.ts') diff --git a/client-web/source/room_watches.ts b/client-web/source/room_watches.ts index 3e41507..2e8d2f9 100644 --- a/client-web/source/room_watches.ts +++ b/client-web/source/room_watches.ts @@ -70,7 +70,14 @@ export function ui_room_watches(conn: SignalingConnection): HTMLElement { update_watches() input.value = "" } - }, "Add") + }, "Add"), + e("button", { + async onclick() { + if (!conn.room) return + await add_watch(conn.room) + update_watches() + } + }, "Add current room") )) } } -- cgit v1.2.3-70-g09d2