From cdf051f19bffda07476b5cb67cf521078bceee67 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Wed, 29 Apr 2020 19:16:53 +0200 Subject: [PATCH] api changes --- src/ui/web/login/LoginView.js | 2 +- src/ui/web/login/SessionPickerView.js | 4 ++-- src/ui/web/session/SyncStatusBar.js | 2 +- src/ui/web/session/room/timeline/GapView.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ui/web/login/LoginView.js b/src/ui/web/login/LoginView.js index b472e436..ca8ea945 100644 --- a/src/ui/web/login/LoginView.js +++ b/src/ui/web/login/LoginView.js @@ -32,6 +32,6 @@ function renderLoadProgress(t) { return t.div({className: "loadProgress"}, [ t.div({className: "spinner"}), t.p(vm => vm.loadLabel), - t.if(vm => vm.loading, t.template(t => t.button({onClick: vm => vm.cancel()}, "Cancel login"))) + t.if(vm => vm.loading, t.createTemplate(t => t.button({onClick: vm => vm.cancel()}, "Cancel login"))) ]); } diff --git a/src/ui/web/login/SessionPickerView.js b/src/ui/web/login/SessionPickerView.js index e443ed81..5380efbe 100644 --- a/src/ui/web/login/SessionPickerView.js +++ b/src/ui/web/login/SessionPickerView.js @@ -46,7 +46,7 @@ class SessionPickerItemView extends TemplateView { disabled: vm => vm.isClearing, onClick: () => this.viewModel.export(), }, "Export"); - const downloadExport = t.if(vm => vm.exportDataUrl, t.template((t, vm) => { + const downloadExport = t.if(vm => vm.exportDataUrl, t.createTemplate((t, vm) => { return t.a({ href: vm.exportDataUrl, download: `brawl-session-${this.viewModel.id}.json`, @@ -55,7 +55,7 @@ class SessionPickerItemView extends TemplateView { })); const userName = t.span({className: "userId"}, vm => vm.label); - const errorMessage = t.if(vm => vm.error, t.template(t => t.span({className: "error"}, vm => vm.error))); + const errorMessage = t.if(vm => vm.error, t.createTemplate(t => t.span({className: "error"}, vm => vm.error))); return t.li([t.div({className: "sessionInfo"}, [ userName, errorMessage, diff --git a/src/ui/web/session/SyncStatusBar.js b/src/ui/web/session/SyncStatusBar.js index c9d22a8c..79fbdefe 100644 --- a/src/ui/web/session/SyncStatusBar.js +++ b/src/ui/web/session/SyncStatusBar.js @@ -11,7 +11,7 @@ export class SyncStatusBar extends TemplateView { "SyncStatusBar_shown": true, }}, [ vm => vm.status, - t.if(vm => !vm.isSyncing, t.template(t => t.button({onClick: () => vm.trySync()}, "Try syncing"))), + t.if(vm => !vm.isSyncing, t.createTemplate(t => t.button({onClick: () => vm.trySync()}, "Try syncing"))), window.DEBUG ? t.button({id: "showlogs"}, "Show logs") : "" ]); } diff --git a/src/ui/web/session/room/timeline/GapView.js b/src/ui/web/session/room/timeline/GapView.js index a0daef24..637d3ce3 100644 --- a/src/ui/web/session/room/timeline/GapView.js +++ b/src/ui/web/session/room/timeline/GapView.js @@ -12,7 +12,7 @@ export class GapView extends TemplateView { onClick: () => this.viewModel.fill(), disabled: vm => vm.isLoading }, label), - t.if(vm => vm.error, t.template(t => t.strong(vm => vm.error))) + t.if(vm => vm.error, t.createTemplate(t => t.strong(vm => vm.error))) ]); } }