mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #1711 from maraoz/add/devLogin
add developer easy login
This commit is contained in:
commit
e7211979e8
|
@ -84,6 +84,9 @@ var defaultConfig = {
|
||||||
// for copay.io:
|
// for copay.io:
|
||||||
// clientId: '1036948132229-biqm3b8sirik9lt5rtvjo9kjjpotn4ac.apps.googleusercontent.com',
|
// clientId: '1036948132229-biqm3b8sirik9lt5rtvjo9kjjpotn4ac.apps.googleusercontent.com',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
developmentFeatures: false
|
||||||
|
|
||||||
};
|
};
|
||||||
if (typeof module !== 'undefined')
|
if (typeof module !== 'undefined')
|
||||||
module.exports = defaultConfig;
|
module.exports = defaultConfig;
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
angular.module('copayApp.controllers').controller('DevLoginController', function($scope, $rootScope, $routeParams, identityService) {
|
||||||
|
|
||||||
|
var mail = $routeParams.mail;
|
||||||
|
var password = $routeParams.password;
|
||||||
|
|
||||||
|
var form = {};
|
||||||
|
form.email = {};
|
||||||
|
form.password = {};
|
||||||
|
form.email.$modelValue = mail;
|
||||||
|
form.password.$modelValue = password;
|
||||||
|
|
||||||
|
identityService.open($scope, form);
|
||||||
|
|
||||||
|
});
|
16
js/routes.js
16
js/routes.js
|
@ -73,11 +73,19 @@ angular
|
||||||
.when('/manage', {
|
.when('/manage', {
|
||||||
templateUrl: 'views/manage.html',
|
templateUrl: 'views/manage.html',
|
||||||
logged: true
|
logged: true
|
||||||
})
|
|
||||||
.otherwise({
|
|
||||||
templateUrl: 'views/errors/404.html',
|
|
||||||
title: 'Error'
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (config.developmentFeatures) {
|
||||||
|
$routeProvider.when('/devLogin/:mail/:password', {
|
||||||
|
templateUrl: 'views/devLogin.html',
|
||||||
|
logged: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
$routeProvider.otherwise({
|
||||||
|
templateUrl: 'views/errors/404.html',
|
||||||
|
title: 'Error'
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
//Setting HTML5 Location Mode
|
//Setting HTML5 Location Mode
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
<div class="settings" ng-controller="DevLoginController">
|
||||||
|
</div>
|
Loading…
Reference in New Issue