mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-22 19:14:52 +01:00
Put logic into VM
This commit is contained in:
parent
98bd8cd624
commit
e6f43d6f4f
@ -143,6 +143,18 @@ export class GapTile extends SimpleTile {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
get currentAction() {
|
||||
if (this.error) {
|
||||
return this.error;
|
||||
}
|
||||
else if (this.isLoading) {
|
||||
return "Loading";
|
||||
}
|
||||
else {
|
||||
return "Not Loading";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
import {FragmentBoundaryEntry} from "../../../../../matrix/room/timeline/entries/FragmentBoundaryEntry.js";
|
||||
|
@ -31,17 +31,7 @@ export class GapView extends TemplateView {
|
||||
};
|
||||
return t.li({ className }, [
|
||||
t.if(vm => vm.showSpinner, (t) => spinner(t)),
|
||||
t.span(vm => {
|
||||
if (vm.error) {
|
||||
return vm.error;
|
||||
}
|
||||
else if (vm.isLoading) {
|
||||
return "Loading";
|
||||
}
|
||||
else {
|
||||
return "Not Loading";
|
||||
}
|
||||
})
|
||||
t.span(vm => vm.currentAction)
|
||||
]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user