From 049a477008f380e26d2a66b25dbedbfbfdd6eba5 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 27 Apr 2022 12:27:19 +0530 Subject: [PATCH 1/3] Pass flowSelector from Client.startRegistration --- src/matrix/Client.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/matrix/Client.js b/src/matrix/Client.js index b24c1ec9..21175a7f 100644 --- a/src/matrix/Client.js +++ b/src/matrix/Client.js @@ -132,14 +132,15 @@ export class Client { }); } - async startRegistration(homeserver, username, password, initialDeviceDisplayName) { + async startRegistration(homeserver, username, password, initialDeviceDisplayName, flowSelector) { const request = this._platform.request; const hsApi = new HomeServerApi({homeserver, request}); const registration = new Registration(hsApi, { username, password, initialDeviceDisplayName, - }); + }, + flowSelector); return registration; } From c07a42292cb5ef7829d938f860afbb1175717f28 Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 27 Apr 2022 12:28:48 +0530 Subject: [PATCH 2/3] Include Platform change in sdk docs --- doc/SDK.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/SDK.md b/doc/SDK.md index 54e37cca..cd81f15b 100644 --- a/doc/SDK.md +++ b/doc/SDK.md @@ -53,7 +53,7 @@ import "hydrogen-view-sdk/theme-element-light.css"; async function main() { const app = document.querySelector('#app')! const config = {}; - const platform = new Platform(app, assetPaths, config, { development: import.meta.env.DEV }); + const platform = new Platform({container: app, assetPaths, config, options: { development: import.meta.env.DEV }}); const navigation = createNavigation(); platform.setNavigation(navigation); const urlRouter = createRouter({ From 83664a1b13d266eb0b6d49f09a37f28753b293dc Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 27 Apr 2022 12:38:12 +0530 Subject: [PATCH 3/3] viewClassForTile is needed for TimelineView --- doc/SDK.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/SDK.md b/doc/SDK.md index cd81f15b..3f5bdb09 100644 --- a/doc/SDK.md +++ b/doc/SDK.md @@ -31,7 +31,8 @@ import { createNavigation, createRouter, RoomViewModel, - TimelineView + TimelineView, + viewClassForTile } from "hydrogen-view-sdk"; import downloadSandboxPath from 'hydrogen-view-sdk/download-sandbox.html?url'; import workerPath from 'hydrogen-view-sdk/main.js?url'; @@ -88,7 +89,7 @@ async function main() { navigation, }); await vm.load(); - const view = new TimelineView(vm.timelineViewModel); + const view = new TimelineView(vm.timelineViewModel, viewClassForTile); app.appendChild(view.mount()); } }