Return view from SessionView

This commit is contained in:
RMidhunSuresh 2022-09-12 17:22:53 +05:30
parent 2d4b6b0341
commit d6ba218c08
No known key found for this signature in database

View File

@ -29,6 +29,7 @@ import {SettingsView} from "./settings/SettingsView.js";
import {CreateRoomView} from "./CreateRoomView.js"; import {CreateRoomView} from "./CreateRoomView.js";
import {RightPanelView} from "./rightpanel/RightPanelView.js"; import {RightPanelView} from "./rightpanel/RightPanelView.js";
import {viewClassForTile} from "./room/common"; import {viewClassForTile} from "./room/common";
import {JoinRoomView} from "./JoinRoomView";
export class SessionView extends TemplateView { export class SessionView extends TemplateView {
render(t, vm) { render(t, vm) {
@ -48,6 +49,8 @@ export class SessionView extends TemplateView {
return new SettingsView(vm.settingsViewModel); return new SettingsView(vm.settingsViewModel);
} else if (vm.createRoomViewModel) { } else if (vm.createRoomViewModel) {
return new CreateRoomView(vm.createRoomViewModel); return new CreateRoomView(vm.createRoomViewModel);
} else if (vm.joinRoomViewModel) {
return new JoinRoomView(vm.joinRoomViewModel);
} else if (vm.currentRoomViewModel) { } else if (vm.currentRoomViewModel) {
if (vm.currentRoomViewModel.kind === "invite") { if (vm.currentRoomViewModel.kind === "invite") {
return new InviteView(vm.currentRoomViewModel); return new InviteView(vm.currentRoomViewModel);