mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-27 11:09:20 +03:00
Enhancement to Two Factor Auth (Closes #123)
This commit is contained in:
parent
e86afd8d6e
commit
fa8d7e5ebe
32 changed files with 150 additions and 56 deletions
|
|
@ -1101,12 +1101,14 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
Plugins.runHook('rl-start-user-screens');
|
||||
RL.pub('rl.bootstart-user-screens');
|
||||
|
||||
if (!!RL.settingsGet('AccountSignMe'))
|
||||
if (!!RL.settingsGet('AccountSignMe') && window.navigator.registerProtocolHandler)
|
||||
{
|
||||
_.delay(function () {
|
||||
window.navigator.registerProtocolHandler('mailto',
|
||||
window.location.protocol + '//' + window.location.host + window.location.pathname + '?mailto&to=%s',
|
||||
'' + (RL.settingsGet('Title') || 'RainLoop'));
|
||||
try {
|
||||
window.navigator.registerProtocolHandler('mailto',
|
||||
window.location.protocol + '//' + window.location.host + window.location.pathname + '?mailto&to=%s',
|
||||
'' + (RL.settingsGet('Title') || 'RainLoop'));
|
||||
} catch(e) {}
|
||||
|
||||
if (RL.settingsGet('MailToEmail'))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,8 +35,9 @@ WebMailAjaxRemoteStorage.prototype.folders = function (fCallback)
|
|||
* @param {boolean} bSignMe
|
||||
* @param {string=} sLanguage
|
||||
* @param {string=} sAdditionalCode
|
||||
* @param {boolean=} bAdditionalCodeSignMe
|
||||
*/
|
||||
WebMailAjaxRemoteStorage.prototype.login = function (fCallback, sEmail, sLogin, sPassword, bSignMe, sLanguage, sAdditionalCode)
|
||||
WebMailAjaxRemoteStorage.prototype.login = function (fCallback, sEmail, sLogin, sPassword, bSignMe, sLanguage, sAdditionalCode, bAdditionalCodeSignMe)
|
||||
{
|
||||
this.defaultRequest(fCallback, 'Login', {
|
||||
'Email': sEmail,
|
||||
|
|
@ -44,6 +45,7 @@ WebMailAjaxRemoteStorage.prototype.login = function (fCallback, sEmail, sLogin,
|
|||
'Password': sPassword,
|
||||
'Language': sLanguage || '',
|
||||
'AdditionalCode': sAdditionalCode || '',
|
||||
'AdditionalCodeSignMe': bAdditionalCodeSignMe ? '1' : '0',
|
||||
'SignMe': bSignMe ? '1' : '0'
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@
|
|||
.border-radius(3px);
|
||||
}
|
||||
|
||||
.inputLoginForm, .inputEmail, .inputLogin, .inputPassword {
|
||||
.inputLoginForm, .inputEmail, .inputLogin, .inputPassword, .inputAdditionalCode {
|
||||
font-size: 18px;
|
||||
height: 30px;
|
||||
line-height: 29px;
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ function LoginViewModel()
|
|||
this.additionalCode.error = ko.observable(false);
|
||||
this.additionalCode.focused = ko.observable(false);
|
||||
this.additionalCode.visibility = ko.observable(false);
|
||||
this.additionalCodeSignMe = ko.observable(false);
|
||||
|
||||
this.logoImg = Utils.trim(RL.settingsGet('LoginLogo'));
|
||||
this.loginDescription = Utils.trim(RL.settingsGet('LoginDescription'));
|
||||
|
|
@ -137,7 +138,9 @@ function LoginViewModel()
|
|||
|
||||
}, this), this.email(), this.login(), this.password(), !!this.signMe(),
|
||||
this.bSendLanguage ? this.mainLanguage() : '',
|
||||
this.additionalCode.visibility() ? this.additionalCode() : '');
|
||||
this.additionalCode.visibility() ? this.additionalCode() : '',
|
||||
this.additionalCode.visibility() ? !!this.additionalCodeSignMe() : false
|
||||
);
|
||||
|
||||
return true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue