From 4f46854362bf3ea63331703af716f84ffbd1caea Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 14 Oct 2020 14:54:46 +0200 Subject: [PATCH] add close session button --- src/domain/session/leftpanel/LeftPanelViewModel.js | 5 +++++ src/ui/web/session/leftpanel/LeftPanelView.js | 1 + 2 files changed, 6 insertions(+) diff --git a/src/domain/session/leftpanel/LeftPanelViewModel.js b/src/domain/session/leftpanel/LeftPanelViewModel.js index 8dc3d224..b5b652ab 100644 --- a/src/domain/session/leftpanel/LeftPanelViewModel.js +++ b/src/domain/session/leftpanel/LeftPanelViewModel.js @@ -44,6 +44,11 @@ export class LeftPanelViewModel extends ViewModel { this._roomList = this._roomListFilterMap.sortValues((a, b) => a.compare(b)); this._currentTileVM = null; this._setupNavigation(); + this._closeUrl = this.urlRouter.urlForSegment("session"); + } + + get closeUrl() { + return this._closeUrl; } _setupNavigation() { diff --git a/src/ui/web/session/leftpanel/LeftPanelView.js b/src/ui/web/session/leftpanel/LeftPanelView.js index d2f38923..7c3d939b 100644 --- a/src/ui/web/session/leftpanel/LeftPanelView.js +++ b/src/ui/web/session/leftpanel/LeftPanelView.js @@ -57,6 +57,7 @@ export class LeftPanelView extends TemplateView { vm.i18n`Enable grid layout`; }; const utilitiesRow = t.div({className: "utilities"}, [ + t.a({className: "button-utility close-session", href: vm.closeUrl}), t.view(new FilterField({ i18n: vm.i18n, label: vm.i18n`Filter rooms…`,