move credential.js from customize.dist/ to www/common/

pull/1/head
ansuz 5 years ago
parent 83c19f01f3
commit 6425d492f1

@ -4,7 +4,7 @@ define([
'/bower_components/chainpad-crypto/crypto.js', '/bower_components/chainpad-crypto/crypto.js',
'/common/common-util.js', '/common/common-util.js',
'/common/outer/network-config.js', '/common/outer/network-config.js',
'/customize/credential.js', '/common/common-credential.js',
'/bower_components/chainpad/chainpad.dist.js', '/bower_components/chainpad/chainpad.dist.js',
'/common/common-realtime.js', '/common/common-realtime.js',
'/common/common-constants.js', '/common/common-constants.js',

@ -1,9 +1,6 @@
define([ (function () {
'/customize/application_config.js', var factory = function (AppConfig, Scrypt) {
'/bower_components/scrypt-async/scrypt-async.min.js',
], function (AppConfig) {
var Cred = {}; var Cred = {};
var Scrypt = window.scrypt;
Cred.MINIMUM_PASSWORD_LENGTH = typeof(AppConfig.minimumPasswordLength) === 'number'? Cred.MINIMUM_PASSWORD_LENGTH = typeof(AppConfig.minimumPasswordLength) === 'number'?
AppConfig.minimumPasswordLength: 8; AppConfig.minimumPasswordLength: 8;
@ -86,4 +83,19 @@ define([
}; };
return Cred; return Cred;
}); };
if (typeof(module) !== 'undefined' && module.exports) {
module.exports = factory(
{}, //require("../../customize.dist/application_config.js"),
require("../bower_components/scrypt-async/scrypt-async.min.js")
);
} else if ((typeof(define) !== 'undefined' && define !== null) && (define.amd !== null)) {
define([
'/customize/application_config.js',
'/bower_components/scrypt-async/scrypt-async.min.js',
], function (AppConfig) {
return factory(AppConfig, window.scrypt);
});
}
}());

@ -1017,7 +1017,7 @@ define([
var Cred, Block, Login; var Cred, Block, Login;
Nthen(function (waitFor) { Nthen(function (waitFor) {
require([ require([
'/customize/credential.js', '/common/common-credential.js',
'/common/outer/login-block.js', '/common/outer/login-block.js',
'/customize/login.js' '/customize/login.js'
], waitFor(function (_Cred, _Block, _Login) { ], waitFor(function (_Cred, _Block, _Login) {

@ -3,7 +3,7 @@ define([
'/customize/login.js', '/customize/login.js',
'/common/cryptpad-common.js', '/common/cryptpad-common.js',
'/common/test.js', '/common/test.js',
'/customize/credential.js', // preloaded for login.js '/common/common-credential.js',
'/common/common-interface.js', '/common/common-interface.js',
'/common/common-util.js', '/common/common-util.js',
'/common/common-realtime.js', '/common/common-realtime.js',

@ -9,7 +9,7 @@ define([
'/common/common-hash.js', '/common/common-hash.js',
'/customize/messages.js', '/customize/messages.js',
'/common/hyperscript.js', '/common/hyperscript.js',
'/customize/credential.js', '/common/common-credential.js',
'/customize/application_config.js', '/customize/application_config.js',
'/api/config', '/api/config',
'/common/make-backup.js', '/common/make-backup.js',

Loading…
Cancel
Save