mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-11 01:07:39 +08:00
19 lines
398 B
React
19 lines
398 B
React
|
|
||
|
import {_} from 'common';
|
||
|
import ko from 'ko';
|
||
|
|
||
|
class IdentityUserStore
|
||
|
{
|
||
|
constructor()
|
||
|
{
|
||
|
this.identities = ko.observableArray([]);
|
||
|
this.identities.loading = ko.observable(false).extend({'throttle': 100});
|
||
|
|
||
|
this.identitiesIDS = ko.computed(() => {
|
||
|
return _.compact(_.map(this.identities(), (item) => item ? item.id : null));
|
||
|
}, this);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = new IdentityUserStore();
|