mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 03:25:12 +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;
|
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";
|
import {FragmentBoundaryEntry} from "../../../../../matrix/room/timeline/entries/FragmentBoundaryEntry.js";
|
||||||
|
@ -31,17 +31,7 @@ export class GapView extends TemplateView {
|
|||||||
};
|
};
|
||||||
return t.li({ className }, [
|
return t.li({ className }, [
|
||||||
t.if(vm => vm.showSpinner, (t) => spinner(t)),
|
t.if(vm => vm.showSpinner, (t) => spinner(t)),
|
||||||
t.span(vm => {
|
t.span(vm => vm.currentAction)
|
||||||
if (vm.error) {
|
|
||||||
return vm.error;
|
|
||||||
}
|
|
||||||
else if (vm.isLoading) {
|
|
||||||
return "Loading";
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return "Not Loading";
|
|
||||||
}
|
|
||||||
})
|
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user