mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-09-14 09:04:31 +08:00
Small fixes
This commit is contained in:
parent
1066af98d4
commit
86dc0c653b
5 changed files with 27 additions and 21 deletions
|
@ -125,7 +125,7 @@
|
||||||
sTitle = ((Utils.isNormal(sTitle) && 0 < sTitle.length) ? sTitle + ' - ' : '') +
|
sTitle = ((Utils.isNormal(sTitle) && 0 < sTitle.length) ? sTitle + ' - ' : '') +
|
||||||
Settings.settingsGet('Title') || '';
|
Settings.settingsGet('Title') || '';
|
||||||
|
|
||||||
window.document.title = '_';
|
window.document.title = '';
|
||||||
window.document.title = sTitle;
|
window.document.title = sTitle;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
window = require('window'),
|
window = require('window'),
|
||||||
_ = require('_'),
|
_ = require('_'),
|
||||||
ko = require('ko'),
|
ko = require('ko'),
|
||||||
|
SimplePace = require('SimplePace'),
|
||||||
|
|
||||||
Enums = require('Common/Enums'),
|
Enums = require('Common/Enums'),
|
||||||
Utils = require('Common/Utils'),
|
Utils = require('Common/Utils'),
|
||||||
|
@ -263,9 +264,9 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.SimplePace)
|
if (SimplePace)
|
||||||
{
|
{
|
||||||
window.SimplePace.set(100);
|
SimplePace.set(100);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
_ = require('_'),
|
_ = require('_'),
|
||||||
$ = require('$'),
|
$ = require('$'),
|
||||||
moment = require('moment'),
|
moment = require('moment'),
|
||||||
|
SimplePace = require('SimplePace'),
|
||||||
|
|
||||||
Enums = require('Common/Enums'),
|
Enums = require('Common/Enums'),
|
||||||
Globals = require('Common/Globals'),
|
Globals = require('Common/Globals'),
|
||||||
|
@ -1257,6 +1258,7 @@
|
||||||
|
|
||||||
var
|
var
|
||||||
self = this,
|
self = this,
|
||||||
|
$LAB = require('$LAB'),
|
||||||
sJsHash = Settings.settingsGet('JsHash'),
|
sJsHash = Settings.settingsGet('JsHash'),
|
||||||
iContactsSyncInterval = Utils.pInt(Settings.settingsGet('ContactsSyncInterval')),
|
iContactsSyncInterval = Utils.pInt(Settings.settingsGet('ContactsSyncInterval')),
|
||||||
bGoogle = Settings.settingsGet('AllowGoogleSocial'),
|
bGoogle = Settings.settingsGet('AllowGoogleSocial'),
|
||||||
|
@ -1284,10 +1286,10 @@
|
||||||
|
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
if (window.SimplePace)
|
if (SimplePace)
|
||||||
{
|
{
|
||||||
window.SimplePace.set(70);
|
SimplePace.set(70);
|
||||||
window.SimplePace.sleep();
|
SimplePace.sleep();
|
||||||
}
|
}
|
||||||
|
|
||||||
Globals.leftPanelDisabled.subscribe(function (bValue) {
|
Globals.leftPanelDisabled.subscribe(function (bValue) {
|
||||||
|
@ -1304,9 +1306,9 @@
|
||||||
|
|
||||||
if (bValue)
|
if (bValue)
|
||||||
{
|
{
|
||||||
if (window.$LAB && window.crypto && window.crypto.getRandomValues && Settings.capa(Enums.Capa.OpenPGP))
|
if ($LAB && window.crypto && window.crypto.getRandomValues && Settings.capa(Enums.Capa.OpenPGP))
|
||||||
{
|
{
|
||||||
window.$LAB.script(window.openpgp ? '' : LinkBuilder.openPgpJs()).wait(function () {
|
$LAB.script(window.openpgp ? '' : LinkBuilder.openPgpJs()).wait(function () {
|
||||||
if (window.openpgp)
|
if (window.openpgp)
|
||||||
{
|
{
|
||||||
Data.openpgp = window.openpgp;
|
Data.openpgp = window.openpgp;
|
||||||
|
@ -1405,9 +1407,9 @@
|
||||||
self.bootstartLoginScreen();
|
self.bootstartLoginScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window.SimplePace)
|
if (SimplePace)
|
||||||
{
|
{
|
||||||
window.SimplePace.set(100);
|
SimplePace.set(100);
|
||||||
}
|
}
|
||||||
|
|
||||||
}, self));
|
}, self));
|
||||||
|
@ -1416,9 +1418,9 @@
|
||||||
{
|
{
|
||||||
this.bootstartLoginScreen();
|
this.bootstartLoginScreen();
|
||||||
|
|
||||||
if (window.SimplePace)
|
if (SimplePace)
|
||||||
{
|
{
|
||||||
window.SimplePace.set(100);
|
SimplePace.set(100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
$ = require('$'),
|
$ = require('$'),
|
||||||
ko = require('ko'),
|
ko = require('ko'),
|
||||||
Autolinker = require('Autolinker'),
|
Autolinker = require('Autolinker'),
|
||||||
|
JSEncrypt = require('JSEncrypt'),
|
||||||
|
|
||||||
Enums = require('Common/Enums'),
|
Enums = require('Common/Enums'),
|
||||||
Consts = require('Common/Consts'),
|
Consts = require('Common/Consts'),
|
||||||
|
@ -177,8 +178,8 @@
|
||||||
*/
|
*/
|
||||||
Utils.rsaObject = function (sPublicKey)
|
Utils.rsaObject = function (sPublicKey)
|
||||||
{
|
{
|
||||||
if (sPublicKey && (null === oEncryptObject || (oEncryptObject && oEncryptObject.__sPublicKey !== sPublicKey)) &&
|
if (JSEncrypt && sPublicKey && (null === oEncryptObject || (oEncryptObject && oEncryptObject.__sPublicKey !== sPublicKey)) &&
|
||||||
window.crypto && window.crypto.getRandomValues && window.JSEncrypt)
|
window.crypto && window.crypto.getRandomValues)
|
||||||
{
|
{
|
||||||
oEncryptObject = new JSEncrypt();
|
oEncryptObject = new JSEncrypt();
|
||||||
oEncryptObject.setPublicKey(sPublicKey);
|
oEncryptObject.setPublicKey(sPublicKey);
|
||||||
|
@ -199,7 +200,7 @@
|
||||||
*/
|
*/
|
||||||
Utils.rsaEncode = function (sValue, sPublicKey)
|
Utils.rsaEncode = function (sValue, sPublicKey)
|
||||||
{
|
{
|
||||||
if (window.crypto && window.crypto.getRandomValues && window.JSEncrypt && sPublicKey)
|
if (window.crypto && window.crypto.getRandomValues && sPublicKey)
|
||||||
{
|
{
|
||||||
var
|
var
|
||||||
sResultValue = false,
|
sResultValue = false,
|
||||||
|
@ -209,18 +210,17 @@
|
||||||
if (oEncrypt)
|
if (oEncrypt)
|
||||||
{
|
{
|
||||||
sResultValue = oEncrypt.encrypt(Utils.fakeMd5() + ':' + sValue + ':' + Utils.fakeMd5())
|
sResultValue = oEncrypt.encrypt(Utils.fakeMd5() + ':' + sValue + ':' + Utils.fakeMd5())
|
||||||
}
|
|
||||||
|
|
||||||
if (false !== sResultValue && Utils.isNormal(sResultValue))
|
if (false !== sResultValue && Utils.isNormal(sResultValue))
|
||||||
{
|
{
|
||||||
return 'rsa:xxx:' + sResultValue;
|
return 'rsa:xxx:' + sResultValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return sValue;
|
return sValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
Utils.rsaEncode.supported = !!(window.crypto && window.crypto.getRandomValues && window.JSEncrypt);
|
Utils.rsaEncode.supported = !!(window.crypto && window.crypto.getRandomValues && JSEncrypt);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} sText
|
* @param {string} sText
|
||||||
|
|
|
@ -25,6 +25,9 @@ module.exports = {
|
||||||
externals: {
|
externals: {
|
||||||
'window': 'window',
|
'window': 'window',
|
||||||
'JSON': 'JSON',
|
'JSON': 'JSON',
|
||||||
|
'JSEncrypt': 'window.JSEncrypt',
|
||||||
|
'$LAB': 'window.$LAB',
|
||||||
|
'SimplePace': 'window.SimplePace',
|
||||||
'moment': 'moment',
|
'moment': 'moment',
|
||||||
'ifvisible': 'ifvisible',
|
'ifvisible': 'ifvisible',
|
||||||
'crossroads': 'crossroads',
|
'crossroads': 'crossroads',
|
||||||
|
|
Loading…
Add table
Reference in a new issue