mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
OpenPGP (#53) UNSTABLE
This commit is contained in:
parent
67b5a72a71
commit
b330f77bc0
14 changed files with 526 additions and 260 deletions
|
|
@ -16,7 +16,11 @@ function AbstractApp()
|
|||
|
||||
this.isLocalAutocomplete = true;
|
||||
|
||||
this.popupVisibility = ko.observable(false);
|
||||
this.popupVisibilityNames = ko.observableArray([]);
|
||||
|
||||
this.popupVisibility = ko.computed(function () {
|
||||
return 0 < this.popupVisibilityNames().length;
|
||||
}, this);
|
||||
|
||||
this.iframe = $('<iframe style="display:none" src="javascript:;" />').appendTo('body');
|
||||
|
||||
|
|
|
|||
|
|
@ -333,17 +333,21 @@ RainLoopApp.prototype.reloadOpenPgpKeys = function ()
|
|||
;
|
||||
|
||||
_.each(oOpenpgpKeys, function (oItem, iIndex) {
|
||||
if (oItem)
|
||||
if (oItem && oItem.primaryKey)
|
||||
{
|
||||
var
|
||||
aIDs = _.map(oItem.getKeyIds(), function (oID) {
|
||||
return oID ? oID.toHex() : '';
|
||||
})
|
||||
var
|
||||
oPrimaryUser = oItem.getPrimaryUser(),
|
||||
sUser = (oPrimaryUser && oPrimaryUser.user) ? oPrimaryUser.user.userId.userid
|
||||
: (oItem.users && oItem.users[0] ? oItem.users[0].userId.userid : '')
|
||||
;
|
||||
|
||||
aKeys.push(
|
||||
new OpenPgpKeyModel(iIndex, aIDs.join(', '), oItem.getUserIds().join(', '),
|
||||
oItem.isPrivate(), oItem.armor())
|
||||
aKeys.push(new OpenPgpKeyModel(
|
||||
iIndex,
|
||||
oItem.primaryKey.getFingerprint(),
|
||||
oItem.primaryKey.getKeyId().toHex().toLowerCase(),
|
||||
sUser,
|
||||
oItem.isPrivate(),
|
||||
oItem.armor())
|
||||
);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue