Merge pull request #1711 from maraoz/add/devLogin

add developer easy login
This commit is contained in:
Matias Alejo Garcia 2014-11-04 11:59:34 -03:00
commit e7211979e8
4 changed files with 33 additions and 4 deletions

View File

@ -84,6 +84,9 @@ var defaultConfig = {
// for copay.io:
// clientId: '1036948132229-biqm3b8sirik9lt5rtvjo9kjjpotn4ac.apps.googleusercontent.com',
},
developmentFeatures: false
};
if (typeof module !== 'undefined')
module.exports = defaultConfig;

View File

@ -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);
});

View File

@ -73,11 +73,19 @@ angular
.when('/manage', {
templateUrl: 'views/manage.html',
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

2
views/devLogin.html Normal file
View File

@ -0,0 +1,2 @@
<div class="settings" ng-controller="DevLoginController">
</div>