snappymail/dev/Stores/User/Pgp.js
2015-02-17 17:33:04 +04:00

41 lines
661 B
JavaScript

(function () {
'use strict';
var
ko = require('ko')
;
/**
* @constructor
*/
function PgpUserStore()
{
this.capaOpenPGP = ko.observable(false);
this.openpgp = null;
this.openpgpkeys = ko.observableArray([]);
this.openpgpKeyring = null;
this.openpgpkeysPublic = this.openpgpkeys.filter(function (oItem) {
return !!(oItem && !oItem.isPrivate);
});
this.openpgpkeysPrivate = this.openpgpkeys.filter(function (oItem) {
return !!(oItem && oItem.isPrivate);
});
}
/**
* @return {boolean}
*/
PgpUserStore.prototype.isSupported = function ()
{
return !!this.openpgp;
};
module.exports = new PgpUserStore();
}());