forked from mystiq/hydrogen-web
start of session picker view
This commit is contained in:
parent
c27172fc4e
commit
1082233de4
1 changed files with 28 additions and 0 deletions
28
src/ui/web/login/SessionPickerView.js
Normal file
28
src/ui/web/login/SessionPickerView.js
Normal file
|
@ -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();
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue