api changes

This commit is contained in:
Bruno Windels 2020-04-29 19:16:53 +02:00
parent 2c8c1eb767
commit cdf051f19b
4 changed files with 5 additions and 5 deletions

View file

@ -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")))
]);
}

View file

@ -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,

View file

@ -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") : ""
]);
}

View file

@ -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)))
]);
}
}