render grid view in session view
This commit is contained in:
parent
dc1357bb31
commit
7955462dda
1 changed files with 9 additions and 5 deletions
|
@ -19,6 +19,7 @@ import {RoomView} from "./room/RoomView.js";
|
||||||
import {TemplateView} from "../general/TemplateView.js";
|
import {TemplateView} from "../general/TemplateView.js";
|
||||||
import {RoomPlaceholderView} from "./RoomPlaceholderView.js";
|
import {RoomPlaceholderView} from "./RoomPlaceholderView.js";
|
||||||
import {SessionStatusView} from "./SessionStatusView.js";
|
import {SessionStatusView} from "./SessionStatusView.js";
|
||||||
|
import {RoomGridView} from "./RoomGridView.js";
|
||||||
|
|
||||||
export class SessionView extends TemplateView {
|
export class SessionView extends TemplateView {
|
||||||
render(t, vm) {
|
render(t, vm) {
|
||||||
|
@ -31,10 +32,13 @@ export class SessionView extends TemplateView {
|
||||||
t.view(new SessionStatusView(vm.sessionStatusViewModel)),
|
t.view(new SessionStatusView(vm.sessionStatusViewModel)),
|
||||||
t.div({className: "main"}, [
|
t.div({className: "main"}, [
|
||||||
t.view(new LeftPanelView(vm.leftPanelViewModel)),
|
t.view(new LeftPanelView(vm.leftPanelViewModel)),
|
||||||
t.mapView(vm => vm.currentRoom, currentRoom => {
|
t.mapView(vm => vm.middlePanelViewType, middlePanelViewType => {
|
||||||
if (currentRoom) {
|
switch (middlePanelViewType) {
|
||||||
return new RoomView(currentRoom);
|
case "room":
|
||||||
} else {
|
return new RoomView(vm.currentRoom);
|
||||||
|
case "roomgrid":
|
||||||
|
return new RoomGridView(vm.roomGridViewModel);
|
||||||
|
case "placeholder":
|
||||||
return new RoomPlaceholderView();
|
return new RoomPlaceholderView();
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Reference in a new issue