mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
render grid view in session view
This commit is contained in:
parent
dc1357bb31
commit
7955462dda
@ -19,6 +19,7 @@ import {RoomView} from "./room/RoomView.js";
|
||||
import {TemplateView} from "../general/TemplateView.js";
|
||||
import {RoomPlaceholderView} from "./RoomPlaceholderView.js";
|
||||
import {SessionStatusView} from "./SessionStatusView.js";
|
||||
import {RoomGridView} from "./RoomGridView.js";
|
||||
|
||||
export class SessionView extends TemplateView {
|
||||
render(t, vm) {
|
||||
@ -31,10 +32,13 @@ export class SessionView extends TemplateView {
|
||||
t.view(new SessionStatusView(vm.sessionStatusViewModel)),
|
||||
t.div({className: "main"}, [
|
||||
t.view(new LeftPanelView(vm.leftPanelViewModel)),
|
||||
t.mapView(vm => vm.currentRoom, currentRoom => {
|
||||
if (currentRoom) {
|
||||
return new RoomView(currentRoom);
|
||||
} else {
|
||||
t.mapView(vm => vm.middlePanelViewType, middlePanelViewType => {
|
||||
switch (middlePanelViewType) {
|
||||
case "room":
|
||||
return new RoomView(vm.currentRoom);
|
||||
case "roomgrid":
|
||||
return new RoomGridView(vm.roomGridViewModel);
|
||||
case "placeholder":
|
||||
return new RoomPlaceholderView();
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user