mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 03:29:20 +03:00
PreRelease fixes
This commit is contained in:
parent
34a9b8cbc5
commit
42bac6aa2f
55 changed files with 578 additions and 238 deletions
|
|
@ -1378,7 +1378,16 @@
|
|||
if ($LAB && window.crypto && window.crypto.getRandomValues && Settings.capa(Enums.Capa.OpenPGP))
|
||||
{
|
||||
var fOpenpgpCallback = function (openpgp) {
|
||||
|
||||
PgpStore.openpgp = openpgp;
|
||||
|
||||
if (window.Worker)
|
||||
{
|
||||
PgpStore.openpgp.initWorker(Links.openPgpWorkerJs());
|
||||
}
|
||||
|
||||
// PgpStore.openpgp.config.useWebCrypto = false;
|
||||
|
||||
PgpStore.openpgpKeyring = new openpgp.Keyring();
|
||||
PgpStore.capaOpenPGP(true);
|
||||
|
||||
|
|
|
|||
|
|
@ -390,7 +390,23 @@
|
|||
*/
|
||||
Links.prototype.openPgpJs = function ()
|
||||
{
|
||||
return this.sStaticPrefix + 'js/min/openpgp.js';
|
||||
return this.sStaticPrefix + 'js/min/openpgp.min.js';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
Links.prototype.openPgpWorkerJs = function ()
|
||||
{
|
||||
return this.sStaticPrefix + 'js/min/openpgp.worker.min.js';
|
||||
};
|
||||
|
||||
/**
|
||||
* @return {string}
|
||||
*/
|
||||
Links.prototype.openPgpWorkerPath = function ()
|
||||
{
|
||||
return this.sStaticPrefix + 'js/min/';
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
90
dev/External/ko.js
vendored
90
dev/External/ko.js
vendored
|
|
@ -821,7 +821,7 @@
|
|||
'parseOnBlur': true,
|
||||
'allowDragAndDrop': true,
|
||||
'focusCallback': fFocusCallback,
|
||||
'inputDelimiters': [',', ';', '\n'],
|
||||
'inputDelimiters': [',', ';', "\n"],
|
||||
'autoCompleteSource': fAutoCompleteSource,
|
||||
// 'elementHook': function (oEl, oItem) {
|
||||
// if (oEl && oItem)
|
||||
|
|
@ -832,52 +832,70 @@
|
|||
// },
|
||||
'parseHook': function (aInput) {
|
||||
|
||||
var aResult = [];
|
||||
|
||||
_.each(aInput, function (sInputValue) {
|
||||
return _.map(aInput, function (sInputValue) {
|
||||
|
||||
var
|
||||
aM = null,
|
||||
aValues = [],
|
||||
sValue = Utils.trim(sInputValue),
|
||||
oEmail = null
|
||||
;
|
||||
|
||||
if ('' !== sValue)
|
||||
{
|
||||
aM = sValue.match(/[@]/g);
|
||||
if (aM && 0 < aM.length)
|
||||
{
|
||||
sValue = sValue.replace(/[\r\n]+/g, '; ').replace(/[\s]+/g, ' ');
|
||||
aValues = EmailModel.splitHelper(sValue, ';');
|
||||
|
||||
_.each(aValues, function (sV) {
|
||||
|
||||
oEmail = new EmailModel();
|
||||
oEmail.mailsoParse(sV);
|
||||
|
||||
if (oEmail.email)
|
||||
{
|
||||
aResult.push([oEmail.toLine(false), oEmail]);
|
||||
}
|
||||
else
|
||||
{
|
||||
aResult.push(['', null]);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
aResult.push([sInputValue, null]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
aResult.push([sInputValue, null]);
|
||||
oEmail = new EmailModel();
|
||||
oEmail.mailsoParse(sValue);
|
||||
return [oEmail.toLine(false), oEmail];
|
||||
}
|
||||
|
||||
return [sValue, null];
|
||||
|
||||
});
|
||||
|
||||
return aResult;
|
||||
// var aResult = [];
|
||||
//
|
||||
// _.each(aInput, function (sInputValue) {
|
||||
//
|
||||
// var
|
||||
// aM = null,
|
||||
// aValues = [],
|
||||
// sValue = Utils.trim(sInputValue),
|
||||
// oEmail = null
|
||||
// ;
|
||||
//
|
||||
// if ('' !== sValue)
|
||||
// {
|
||||
// aM = sValue.match(/[@]/g);
|
||||
// if (aM && 0 < aM.length)
|
||||
// {
|
||||
// sValue = sValue.replace(/[\r\n]+/g, '; ').replace(/[\s]+/g, ' ');
|
||||
// aValues = EmailModel.splitHelper(sValue, ';');
|
||||
//
|
||||
// _.each(aValues, function (sV) {
|
||||
//
|
||||
// oEmail = new EmailModel();
|
||||
// oEmail.mailsoParse(sV);
|
||||
//
|
||||
// if (oEmail.email)
|
||||
// {
|
||||
// aResult.push([oEmail.toLine(false), oEmail]);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// aResult.push(['', null]);
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// aResult.push([sInputValue, null]);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// aResult.push([sInputValue, null]);
|
||||
// }
|
||||
// });
|
||||
//
|
||||
// return aResult;
|
||||
},
|
||||
'change': _.bind(function (oEvent) {
|
||||
$oEl.data('EmailsTagsValue', oEvent.target.value);
|
||||
|
|
|
|||
|
|
@ -33,10 +33,12 @@
|
|||
this.identityForDeletion = ko.observable(null).deleteAccessHelper();
|
||||
}
|
||||
|
||||
AccountsUserSettings.prototype.scrollableOptions = function ()
|
||||
AccountsUserSettings.prototype.scrollableOptions = function (sWrapper)
|
||||
{
|
||||
return {
|
||||
handle: '.drag-handle'
|
||||
handle: '.drag-handle',
|
||||
containment: sWrapper || 'parent',
|
||||
axis: 'y'
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -110,10 +110,12 @@
|
|||
}, this);
|
||||
}
|
||||
|
||||
FiltersUserSettings.prototype.scrollableOptions = function ()
|
||||
FiltersUserSettings.prototype.scrollableOptions = function (sWrapper)
|
||||
{
|
||||
return {
|
||||
handle: '.drag-handle'
|
||||
handle: '.drag-handle',
|
||||
containment: sWrapper || 'parent',
|
||||
axis: 'y'
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
var
|
||||
_ = require('_'),
|
||||
ko = require('ko'),
|
||||
window = require('window'),
|
||||
|
||||
Utils = require('Common/Utils'),
|
||||
|
||||
|
|
@ -24,6 +25,8 @@
|
|||
this.openpgpkeysPrivate = PgpStore.openpgpkeysPrivate;
|
||||
|
||||
this.openPgpKeyForDeletion = ko.observable(null).deleteAccessHelper();
|
||||
|
||||
this.isHttps = window.document && window.document.location ? 'https:' === window.document.location.protocol : false;
|
||||
}
|
||||
|
||||
OpenPgpUserSettings.prototype.addOpenPgpKey = function ()
|
||||
|
|
|
|||
|
|
@ -31,10 +31,12 @@
|
|||
this.templateForDeletion = ko.observable(null).deleteAccessHelper();
|
||||
}
|
||||
|
||||
TemplatesUserSettings.prototype.scrollableOptions = function ()
|
||||
TemplatesUserSettings.prototype.scrollableOptions = function (sWrapper)
|
||||
{
|
||||
return {
|
||||
handle: '.drag-handle'
|
||||
handle: '.drag-handle',
|
||||
containment: sWrapper || 'parent',
|
||||
axis: 'y'
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
cursor: pointer;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
|
||||
.identity-name {
|
||||
display: inline-block;
|
||||
word-break: break-all;
|
||||
|
|
@ -50,6 +50,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
.accounts-list-top-padding, .identities-list-top-padding {
|
||||
display: inline-block;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.account-item {
|
||||
|
||||
.e-action {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
.filters-list-top-padding {
|
||||
display: inline-block;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.filter-item {
|
||||
|
||||
.e-action {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,12 @@
|
|||
}
|
||||
}
|
||||
|
||||
.templates-list-top-padding {
|
||||
display: inline-block;
|
||||
height: 5px;
|
||||
width: 5px;
|
||||
}
|
||||
|
||||
.template-item {
|
||||
|
||||
.e-action {
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
var
|
||||
self = this,
|
||||
sUserID = '',
|
||||
mKeyPair = null,
|
||||
oOpenpgpKeyring = PgpStore.openpgpKeyring
|
||||
;
|
||||
|
||||
|
|
@ -72,7 +71,7 @@
|
|||
'passphrase': Utils.trim(self.password())
|
||||
});
|
||||
|
||||
mPromise.then(function () {
|
||||
mPromise.then(function (mKeyPair) {
|
||||
|
||||
self.submitRequest(false);
|
||||
|
||||
|
|
@ -80,6 +79,7 @@
|
|||
{
|
||||
oOpenpgpKeyring.privateKeys.importKey(mKeyPair.privateKeyArmored);
|
||||
oOpenpgpKeyring.publicKeys.importKey(mKeyPair.publicKeyArmored);
|
||||
|
||||
oOpenpgpKeyring.store();
|
||||
|
||||
require('App/User').reloadOpenPgpKeys();
|
||||
|
|
@ -89,8 +89,11 @@
|
|||
})['catch'](function() {
|
||||
self.submitRequest(false);
|
||||
});
|
||||
|
||||
} catch (e) {}
|
||||
}
|
||||
catch (e)
|
||||
{
|
||||
self.submitRequest(false);
|
||||
}
|
||||
|
||||
}, 100);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue