My Cards and Due Cards development

* add spinner while pages are loading
* use a single publication for My Cards
* add Due Cards to the user menu
* add description to the All Users option for Due Cards
* some code clean-up
This commit is contained in:
John R. Supplee 2021-01-10 18:08:03 +02:00
parent 55b121e0d3
commit ecc3558987
10 changed files with 197 additions and 185 deletions

View file

@ -1,3 +1,5 @@
const subManager = new SubsManager();
BlazeComponent.extendComponent({
dueCardsView() {
// eslint-disable-next-line no-console
@ -40,8 +42,20 @@ BlazeComponent.extendComponent({
BlazeComponent.extendComponent({
onCreated() {
this.isPageReady = new ReactiveVar(false);
this.autorun(() => {
const handle = subManager.subscribe(
'dueCards',
Utils.dueCardsView() === 'all',
);
Tracker.nonreactive(() => {
Tracker.autorun(() => {
this.isPageReady.set(handle.ready());
});
});
});
Meteor.subscribe('setting');
Meteor.subscribe('dueCards', Utils.dueCardsView() === 'all');
},
dueCardsView() {