mirror of https://github.com/xwiki-labs/cryptpad
restore hashing screen in login and register
This commit is contained in:
parent
fab6264ce6
commit
1958bca984
|
@ -1,7 +1,10 @@
|
||||||
define([
|
define([
|
||||||
'jquery',
|
'jquery',
|
||||||
'/common/cryptpad-common.js',
|
'/common/cryptpad-common.js',
|
||||||
'/common/login.js'
|
'/common/login.js',
|
||||||
|
|
||||||
|
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
|
||||||
|
'less!/customize/src/less/loading.less',
|
||||||
], function ($, Cryptpad, Login) {
|
], function ($, Cryptpad, Login) {
|
||||||
$(function () {
|
$(function () {
|
||||||
var $main = $('#mainBlock');
|
var $main = $('#mainBlock');
|
||||||
|
@ -72,7 +75,10 @@ define([
|
||||||
|
|
||||||
// setTimeout 100ms to remove the keyboard on mobile devices before the loading screen pops up
|
// setTimeout 100ms to remove the keyboard on mobile devices before the loading screen pops up
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
Cryptpad.addLoadingScreen({loadingText: Messages.login_hashing});
|
Cryptpad.addLoadingScreen({
|
||||||
|
loadingText: Messages.login_hashing,
|
||||||
|
hideTips: true,
|
||||||
|
});
|
||||||
// We need a setTimeout(cb, 0) otherwise the loading screen is only displayed after hashing the password
|
// We need a setTimeout(cb, 0) otherwise the loading screen is only displayed after hashing the password
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
loginReady(function () {
|
loginReady(function () {
|
||||||
|
|
|
@ -4,6 +4,9 @@ define([
|
||||||
'/common/cryptpad-common.js',
|
'/common/cryptpad-common.js',
|
||||||
'/common/test.js',
|
'/common/test.js',
|
||||||
'/common/credential.js', // preloaded for login.js
|
'/common/credential.js', // preloaded for login.js
|
||||||
|
|
||||||
|
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
|
||||||
|
'less!/customize/src/less/loading.less',
|
||||||
], function ($, Login, Cryptpad, Test) {
|
], function ($, Login, Cryptpad, Test) {
|
||||||
var Messages = Cryptpad.Messages;
|
var Messages = Cryptpad.Messages;
|
||||||
|
|
||||||
|
@ -128,7 +131,10 @@ define([
|
||||||
registering = true;
|
registering = true;
|
||||||
// setTimeout 100ms to remove the keyboard on mobile devices before the loading screen pops up
|
// setTimeout 100ms to remove the keyboard on mobile devices before the loading screen pops up
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
Cryptpad.addLoadingScreen({loadingText: Messages.login_hashing});
|
Cryptpad.addLoadingScreen({
|
||||||
|
loadingText: Messages.login_hashing,
|
||||||
|
hideTips: true,
|
||||||
|
});
|
||||||
// We need a setTimeout(cb, 0) otherwise the loading screen is only displayed after hashing the password
|
// We need a setTimeout(cb, 0) otherwise the loading screen is only displayed after hashing the password
|
||||||
window.setTimeout(function () {
|
window.setTimeout(function () {
|
||||||
Login.loginOrRegister(uname, passwd, true, function (err, result) {
|
Login.loginOrRegister(uname, passwd, true, function (err, result) {
|
||||||
|
@ -193,7 +199,7 @@ define([
|
||||||
logMeIn(result);
|
logMeIn(result);
|
||||||
});
|
});
|
||||||
}, 0);
|
}, 0);
|
||||||
}, 100);
|
}, 200);
|
||||||
}, {
|
}, {
|
||||||
ok: Messages.register_writtenPassword,
|
ok: Messages.register_writtenPassword,
|
||||||
cancel: Messages.register_cancel,
|
cancel: Messages.register_cancel,
|
||||||
|
|
Loading…
Reference in New Issue