Wrap content of JoinRoomView in a body

This commit is contained in:
Paulo Pinto 2023-01-09 15:33:12 +00:00
parent 76e6568b87
commit 7d1d6c73ee
No known key found for this signature in database
2 changed files with 16 additions and 14 deletions

View File

@ -959,7 +959,7 @@ button.link {
margin: 0;
}
.UnknownRoomView {
.UnknownRoomView_body {
align-items: center;
justify-content: center;
text-align: center;

View File

@ -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))
])
]);
}
}