From 1082233de465183a6ff02a8d29c776aa3c07510a Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 31 Jul 2019 00:07:12 +0200 Subject: [PATCH] start of session picker view --- src/ui/web/login/SessionPickerView.js | 28 +++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/ui/web/login/SessionPickerView.js diff --git a/src/ui/web/login/SessionPickerView.js b/src/ui/web/login/SessionPickerView.js new file mode 100644 index 00000000..1b53fe31 --- /dev/null +++ b/src/ui/web/login/SessionPickerView.js @@ -0,0 +1,28 @@ +import * as h from "../general/html.js"; +import ListView from "../general/ListView.js"; + +class SessionPickerItem { + +} + +export default class SessionPickerView extends TemplateView { + mount() { + this._sessionList = new ListView({list: this._viewModel.sessions}, sessionInfo => { + return new SessionPickerItem(sessionInfo); + }); + super.mount(); + } + + render(t, vm) { + this._root = h.div({className: "SessionPickerView"}, [ + this._sessionList.mount(), + h.button() + ]); + + } + + unmount() { + super.unmount(); + this._sessionList.unmount(); + } +}