Add 'back' button to CreateRoomView

This commit is contained in:
Paulo Pinto 2022-12-13 17:29:47 +00:00
parent d66e8c7118
commit 750930bd0c
No known key found for this signature in database
2 changed files with 7 additions and 2 deletions

View File

@ -33,6 +33,7 @@ export class CreateRoomViewModel extends ViewModel {
this._avatarScaledBlob = undefined;
this._avatarFileName = undefined;
this._avatarInfo = undefined;
this._closeUrl = this.urlRouter.urlUntilSegment("session");
}
get isPublic() { return this._isPublic; }
@ -45,6 +46,7 @@ export class CreateRoomViewModel extends ViewModel {
get hasAvatar() { return !!this._avatarScaledBlob; }
get isFederationDisabled() { return this._isFederationDisabled; }
get isAdvancedShown() { return this._isAdvancedShown; }
get closeUrl() { return this._closeUrl; }
setName(name) {
this._name = name;

View File

@ -21,7 +21,10 @@ import {StaticView} from "../general/StaticView";
export class CreateRoomView extends TemplateView {
render(t, vm) {
return t.main({className: "CreateRoomView middle"},
return t.main({className: "CreateRoomView middle"}, [
t.div({className: "CreateRoomView_header middle-header"}, [
t.a({className: "button-utility close-middle", href: vm.closeUrl, title: vm.i18n`Cancel room creation`}),
]),
t.div({className: "CreateRoomView_body centered-column"}, [
t.h2("Create room"),
//t.div({className: "RoomView_error"}, vm => vm.error),
@ -96,7 +99,7 @@ export class CreateRoomView extends TemplateView {
]),
])
])
);
]);
}
onFormChange(evt) {