From 7d1d6c73ee8c90913ae19b04bedba71c89f62417 Mon Sep 17 00:00:00 2001 From: Paulo Pinto Date: Mon, 9 Jan 2023 15:33:12 +0000 Subject: [PATCH] Wrap content of JoinRoomView in a body --- .../web/ui/css/themes/element/theme.css | 2 +- .../web/ui/session/room/UnknownRoomView.js | 28 ++++++++++--------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/platform/web/ui/css/themes/element/theme.css b/src/platform/web/ui/css/themes/element/theme.css index a5d5f1fb..d010220a 100644 --- a/src/platform/web/ui/css/themes/element/theme.css +++ b/src/platform/web/ui/css/themes/element/theme.css @@ -959,7 +959,7 @@ button.link { margin: 0; } -.UnknownRoomView { +.UnknownRoomView_body { align-items: center; justify-content: center; text-align: center; diff --git a/src/platform/web/ui/session/room/UnknownRoomView.js b/src/platform/web/ui/session/room/UnknownRoomView.js index 80d857d8..1f31f413 100644 --- a/src/platform/web/ui/session/room/UnknownRoomView.js +++ b/src/platform/web/ui/session/room/UnknownRoomView.js @@ -18,18 +18,20 @@ import {TemplateView} from "../../general/TemplateView"; export class UnknownRoomView extends TemplateView { render(t, vm) { - return t.main({className: "UnknownRoomView middle"}, t.div([ - t.h2([ - vm.i18n`You are currently not in ${vm.roomIdOrAlias}.`, - t.br(), - vm.i18n`Want to join it?` - ]), - t.button({ - className: "button-action primary", - onClick: () => vm.join(), - disabled: vm => vm.busy, - }, vm.i18n`Join room`), - t.if(vm => vm.error, t => t.p({className: "error"}, vm.error)) - ])); + return t.main({className: "UnknownRoomView middle"}, [ + t.div({className: "UnknownRoomView_body centered-column"}, [ + t.h2([ + vm.i18n`You are currently not in ${vm.roomIdOrAlias}.`, + t.br(), + vm.i18n`Want to join it?` + ]), + t.button({ + className: "button-action primary", + onClick: () => vm.join(), + disabled: vm => vm.busy, + }, vm.i18n`Join room`), + t.if(vm => vm.error, t => t.p({className: "error"}, vm.error)) + ]) + ]); } }