From 3d4ba2015070eb3600615879b0ee34f8945707bf Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Fri, 25 Jun 2021 20:46:15 +0530 Subject: [PATCH] Put up a temporary loading view Signed-off-by: RMidhunSuresh --- src/platform/web/ui/session/rightpanel/MemberListView.js | 7 +++++++ src/platform/web/ui/session/rightpanel/RightPanelView.js | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/platform/web/ui/session/rightpanel/MemberListView.js b/src/platform/web/ui/session/rightpanel/MemberListView.js index 5b941a23..9c4a847a 100644 --- a/src/platform/web/ui/session/rightpanel/MemberListView.js +++ b/src/platform/web/ui/session/rightpanel/MemberListView.js @@ -1,9 +1,16 @@ import {TemplateView} from "../../general/TemplateView.js"; import {ListView} from "../../general/ListView.js"; import {MemberTileView} from "./MemberTileView.js"; +import {spinner} from "../../common.js"; export class MemberListView extends TemplateView { render(t, vm) { return t.view(new ListView({list: vm.memberTileViewModels, className:"MemberListView"}, tileViewModel => new MemberTileView(tileViewModel))); } } + +export class MemberListLoadingView extends TemplateView { + render(t) { + return t.div(["Loading ", spinner(t)]); + } +} diff --git a/src/platform/web/ui/session/rightpanel/RightPanelView.js b/src/platform/web/ui/session/rightpanel/RightPanelView.js index 077c3fc6..aac92458 100644 --- a/src/platform/web/ui/session/rightpanel/RightPanelView.js +++ b/src/platform/web/ui/session/rightpanel/RightPanelView.js @@ -1,13 +1,13 @@ import {TemplateView} from "../../general/TemplateView.js"; import {RoomDetailsView} from "./RoomDetailsView.js"; -import {MemberListView} from "./MemberListView.js"; +import {MemberListLoadingView, MemberListView} from "./MemberListView.js"; export class RightPanelView extends TemplateView { render(t) { return t.div({className: "RightPanelView"}, [ t.mapView(vm => vm.roomDetailsViewModel, roomDetailsViewModel => roomDetailsViewModel ? new RoomDetailsView(roomDetailsViewModel) : null), - t.mapView(vm => vm.memberListViewModel, memberListViewModel => memberListViewModel ? new MemberListView(memberListViewModel) : null) + t.mapView(vm => vm.memberListViewModel, memberListViewModel => memberListViewModel ? new MemberListView(memberListViewModel) : new MemberListLoadingView()) ] ); }