mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
start of session picker view
This commit is contained in:
parent
c27172fc4e
commit
1082233de4
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 New Issue
Block a user