diff --git a/src/domain/session/CreateRoomViewModel.js b/src/domain/session/CreateRoomViewModel.js index 12b4fbd5..ad599c7e 100644 --- a/src/domain/session/CreateRoomViewModel.js +++ b/src/domain/session/CreateRoomViewModel.js @@ -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; diff --git a/src/platform/web/ui/session/CreateRoomView.js b/src/platform/web/ui/session/CreateRoomView.js index 37905b2d..51a40807 100644 --- a/src/platform/web/ui/session/CreateRoomView.js +++ b/src/platform/web/ui/session/CreateRoomView.js @@ -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) {