mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-10 00:38:04 +08:00
28 lines
487 B
JavaScript
28 lines
487 B
JavaScript
|
|
(function () {
|
|
|
|
'use strict';
|
|
|
|
var
|
|
_ = require('_'),
|
|
ko = require('ko')
|
|
;
|
|
|
|
/**
|
|
* @constructor
|
|
*/
|
|
function IdentityUserStore()
|
|
{
|
|
this.identities = ko.observableArray([]);
|
|
this.identities.loading = ko.observable(false).extend({'throttle': 100});
|
|
|
|
this.identitiesIDS = ko.computed(function () {
|
|
return _.compact(_.map(this.identities(), function (oItem) {
|
|
return oItem ? oItem.id : null;
|
|
}));
|
|
}, this);
|
|
}
|
|
|
|
module.exports = new IdentityUserStore();
|
|
|
|
}());
|