Remove knockout-transformations dependency

This commit is contained in:
RainLoop Team 2019-07-04 22:58:15 +03:00
parent 8a0be3212d
commit 40dc22a317
10 changed files with 69 additions and 78 deletions

View file

@ -1,10 +1,11 @@
import _ from '_';
import ko from 'ko';
class DomainAdminStore {
constructor() {
this.domains = ko.observableArray([]);
this.domains.loading = ko.observable(false).extend({ 'throttle': 100 });
this.domainsWithoutAliases = this.domains.filter((item) => item && !item.alias);
this.domainsWithoutAliases = ko.computed(() => _.filter(this.domains(), (item) => item && !item.alias));
}
}

View file

@ -18,8 +18,8 @@ class PgpUserStore {
this.openpgpkeys = ko.observableArray([]);
this.openpgpKeyring = null;
this.openpgpkeysPublic = this.openpgpkeys.filter((item) => !!(item && !item.isPrivate));
this.openpgpkeysPrivate = this.openpgpkeys.filter((item) => !!(item && item.isPrivate));
this.openpgpkeysPublic = ko.computed(() => _.filter(this.openpgpkeys(), (item) => !!(item && !item.isPrivate)));
this.openpgpkeysPrivate = ko.computed(() => _.filter(this.openpgpkeys(), (item) => !!(item && item.isPrivate)));
}
/**