From 023b36575fd69bc606a234e5cd7a25fc0458abde Mon Sep 17 00:00:00 2001 From: Paulo Pinto Date: Mon, 9 Jan 2023 15:36:03 +0000 Subject: [PATCH] Add header to UnknownRoomView --- src/domain/session/room/UnknownRoomViewModel.js | 5 +++++ src/platform/web/ui/session/room/UnknownRoomView.js | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/src/domain/session/room/UnknownRoomViewModel.js b/src/domain/session/room/UnknownRoomViewModel.js index 8bb5fb0a..d91387e0 100644 --- a/src/domain/session/room/UnknownRoomViewModel.js +++ b/src/domain/session/room/UnknownRoomViewModel.js @@ -24,6 +24,11 @@ export class UnknownRoomViewModel extends ViewModel { this.roomIdOrAlias = roomIdOrAlias; this._error = null; this._busy = false; + this._closeUrl = this.urlRouter.urlUntilSegment("session"); + } + + get closeUrl() { + return this._closeUrl; } get error() { diff --git a/src/platform/web/ui/session/room/UnknownRoomView.js b/src/platform/web/ui/session/room/UnknownRoomView.js index 1f31f413..715b60c7 100644 --- a/src/platform/web/ui/session/room/UnknownRoomView.js +++ b/src/platform/web/ui/session/room/UnknownRoomView.js @@ -19,6 +19,10 @@ import {TemplateView} from "../../general/TemplateView"; export class UnknownRoomView extends TemplateView { render(t, vm) { return t.main({className: "UnknownRoomView middle"}, [ + t.div({className: "UnknownRoomView_header middle-header"}, [ + t.a({className: "button-utility close-middle", href: vm.closeUrl, title: vm.i18n`Cancel room join`}), + t.h2("Join room"), + ]), t.div({className: "UnknownRoomView_body centered-column"}, [ t.h2([ vm.i18n`You are currently not in ${vm.roomIdOrAlias}.`,