mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +01:00
api changes
This commit is contained in:
parent
2c8c1eb767
commit
cdf051f19b
@ -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")))
|
||||
]);
|
||||
}
|
||||
|
@ -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,
|
||||
|
@ -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") : ""
|
||||
]);
|
||||
}
|
||||
|
@ -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)))
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user