mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
OpenPGP improvements (first step)
openpgpjs: 0.7.2 -> 0.10.1 additional fixes
This commit is contained in:
parent
09334159c2
commit
34a9b8cbc5
28 changed files with 1363 additions and 644 deletions
|
|
@ -303,16 +303,6 @@
|
|||
this.viewIsImportant = ko.observable(false);
|
||||
this.viewIsFlagged = ko.observable(false);
|
||||
|
||||
// PGP
|
||||
this.viewPgpPassword = ko.observable('');
|
||||
this.viewPgpSignedVerifyStatus = ko.computed(function () {
|
||||
return this.message() ? this.message().pgpSignedVerifyStatus() : Enums.SignedVerifyStatus.None;
|
||||
}, this);
|
||||
|
||||
this.viewPgpSignedVerifyUser = ko.computed(function () {
|
||||
return this.message() ? this.message().pgpSignedVerifyUser() : '';
|
||||
}, this);
|
||||
|
||||
this.viewFromDkimStatusIconClass = ko.computed(function () {
|
||||
|
||||
var sResult = 'icon-none iconcolor-display-none';
|
||||
|
|
@ -361,8 +351,6 @@
|
|||
|
||||
this.messageActiveDom(null);
|
||||
|
||||
this.viewPgpPassword('');
|
||||
|
||||
if (oMessage)
|
||||
{
|
||||
this.showAttachmnetControls(false);
|
||||
|
|
@ -523,48 +511,6 @@
|
|||
return sResult;
|
||||
};
|
||||
|
||||
MessageViewMailBoxUserView.prototype.isPgpActionVisible = function ()
|
||||
{
|
||||
return Enums.SignedVerifyStatus.Success !== this.viewPgpSignedVerifyStatus();
|
||||
};
|
||||
|
||||
MessageViewMailBoxUserView.prototype.isPgpStatusVerifyVisible = function ()
|
||||
{
|
||||
return Enums.SignedVerifyStatus.None !== this.viewPgpSignedVerifyStatus();
|
||||
};
|
||||
|
||||
MessageViewMailBoxUserView.prototype.isPgpStatusVerifySuccess = function ()
|
||||
{
|
||||
return Enums.SignedVerifyStatus.Success === this.viewPgpSignedVerifyStatus();
|
||||
};
|
||||
|
||||
MessageViewMailBoxUserView.prototype.pgpStatusVerifyMessage = function ()
|
||||
{
|
||||
var sResult = '';
|
||||
switch (this.viewPgpSignedVerifyStatus())
|
||||
{
|
||||
case Enums.SignedVerifyStatus.UnknownPublicKeys:
|
||||
sResult = Translator.i18n('PGP_NOTIFICATIONS/NO_PUBLIC_KEYS_FOUND');
|
||||
break;
|
||||
case Enums.SignedVerifyStatus.UnknownPrivateKey:
|
||||
sResult = Translator.i18n('PGP_NOTIFICATIONS/NO_PRIVATE_KEY_FOUND');
|
||||
break;
|
||||
case Enums.SignedVerifyStatus.Unverified:
|
||||
sResult = Translator.i18n('PGP_NOTIFICATIONS/UNVERIFIRED_SIGNATURE');
|
||||
break;
|
||||
case Enums.SignedVerifyStatus.Error:
|
||||
sResult = Translator.i18n('PGP_NOTIFICATIONS/DECRYPTION_ERROR');
|
||||
break;
|
||||
case Enums.SignedVerifyStatus.Success:
|
||||
sResult = Translator.i18n('PGP_NOTIFICATIONS/GOOD_SIGNATURE', {
|
||||
'USER': this.viewPgpSignedVerifyUser()
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
return sResult;
|
||||
};
|
||||
|
||||
MessageViewMailBoxUserView.prototype.fullScreen = function ()
|
||||
{
|
||||
this.fullScreenMode(true);
|
||||
|
|
@ -1256,31 +1202,6 @@
|
|||
return 0 < iCnt ? (100 > iCnt ? iCnt : '99+') : '';
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {MessageModel} oMessage
|
||||
*/
|
||||
MessageViewMailBoxUserView.prototype.verifyPgpSignedClearMessage = function (oMessage)
|
||||
{
|
||||
if (oMessage)
|
||||
{
|
||||
oMessage.verifyPgpSignedClearMessage();
|
||||
}
|
||||
|
||||
this.checkHeaderHeight();
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {MessageModel} oMessage
|
||||
*/
|
||||
MessageViewMailBoxUserView.prototype.decryptPgpEncryptedMessage = function (oMessage)
|
||||
{
|
||||
if (oMessage)
|
||||
{
|
||||
oMessage.decryptPgpEncryptedMessage(this.viewPgpPassword());
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {MessageModel} oMessage
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue