mirror of
https://github.com/wekan/wekan.git
synced 2026-02-16 04:58:07 +01:00
Handle subscriptions better
* use onReady and onStop callbacks when subscribing * show an server error message when the server returns an error * call stop() on subscriptions
This commit is contained in:
parent
28aebaa06b
commit
58020863a8
6 changed files with 65 additions and 52 deletions
|
|
@ -57,7 +57,7 @@ class DueCardsComponent extends CardSearchPagedComponent {
|
|||
queryParams.users = [Meteor.user().username];
|
||||
}
|
||||
|
||||
this.autorunGlobalSearch(queryParams);
|
||||
this.runGlobalSearch(queryParams);
|
||||
}
|
||||
|
||||
dueCardsView() {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,12 @@ template(name="globalSearch")
|
|||
= msg
|
||||
else
|
||||
+resultsPaged(this)
|
||||
else if serverError.get
|
||||
.global-search-page
|
||||
.global-search-help
|
||||
h1 {{_ 'server-error' }}
|
||||
+viewer
|
||||
| {{_ 'server-error-troubleshooting' }}
|
||||
else
|
||||
.global-search-page
|
||||
.global-search-help
|
||||
|
|
|
|||
|
|
@ -431,7 +431,7 @@ class GlobalSearchComponent extends CardSearchPagedComponent {
|
|||
return;
|
||||
}
|
||||
|
||||
this.autorunGlobalSearch(params);
|
||||
this.runGlobalSearch(params);
|
||||
}
|
||||
|
||||
searchInstructions() {
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ class MyCardsComponent extends CardSearchPagedComponent {
|
|||
sort: { name: 'dueAt', order: 'des' },
|
||||
};
|
||||
|
||||
this.autorunGlobalSearch(queryParams);
|
||||
this.runGlobalSearch(queryParams);
|
||||
Meteor.subscribe('setting');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue