mirror of https://github.com/BTCPrivate/copay.git
Fix PIN create. Fix spinner when creating profile
This commit is contained in:
parent
7a4e3565a8
commit
5bc7fcd8d0
|
@ -41,13 +41,6 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
$scope.passwordStrength = null;
|
||||
|
||||
_firstpin = null;
|
||||
|
||||
$scope.setPinForm.newpin.$setViewValue('');
|
||||
$scope.setPinForm.newpin.$render();
|
||||
$scope.setPinForm.repeatpin.$setViewValue('');
|
||||
$scope.setPinForm.repeatpin.$render();
|
||||
$scope.setPinForm.$setPristine();
|
||||
|
||||
$scope.error = 'Entered PINs were not equal. Try again';
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
|
@ -79,7 +72,6 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
_credentials = null;
|
||||
$scope.askForPin = 0;
|
||||
$rootScope.hasPin = true;
|
||||
$rootScope.starting = null;
|
||||
$scope.createDefaultWallet();
|
||||
});
|
||||
}, 100);
|
||||
|
@ -123,8 +115,10 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
/* Last step. Will emit after creation so the UX gets updated */
|
||||
$scope.createDefaultWallet = function() {
|
||||
$rootScope.hideNavigation = false;
|
||||
$rootScope.starting = true;
|
||||
identityService.createDefaultWallet(function(err) {
|
||||
$scope.askForPin = 0;
|
||||
$rootScope.starting = null;
|
||||
|
||||
if (err) {
|
||||
var msg = err.toString();
|
||||
|
@ -143,10 +137,8 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
preconditions.checkArgument(_.isString(password));
|
||||
|
||||
$rootScope.hideNavigation = false;
|
||||
$rootScope.starting = true;
|
||||
|
||||
identityService.create(emailOrUsername, password, function(err) {
|
||||
$rootScope.starting = null;
|
||||
$scope.error = null;
|
||||
if (err) {
|
||||
var msg = err.toString();
|
||||
|
@ -162,6 +154,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
} else {
|
||||
// mobile
|
||||
if ($scope.isMobile) {
|
||||
$rootScope.starting = null;
|
||||
_credentials = {
|
||||
email: emailOrUsername,
|
||||
password: password,
|
||||
|
@ -206,6 +199,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun
|
|||
|
||||
$scope.saveSettings(function(err) {
|
||||
preconditions.checkState(!err, err);
|
||||
$rootScope.starting = true;
|
||||
|
||||
$scope._doCreateProfile($scope.userOrEmail, form.password.$modelValue, function(err) {
|
||||
$timeout(function() {
|
||||
|
|
|
@ -323,7 +323,9 @@ angular.module('copayApp.services')
|
|||
if ($rootScope.iden) {
|
||||
$rootScope.signingOut = true;
|
||||
$rootScope.iden.close(function() { // Will trigger 'closed'
|
||||
$rootScope.signingOut = false;
|
||||
$timeout(function() {
|
||||
$rootScope.signingOut = null;
|
||||
}, 100);
|
||||
}); // Will trigger 'closed'
|
||||
}
|
||||
};
|
||||
|
|
|
@ -214,14 +214,14 @@
|
|||
</span>
|
||||
</div>
|
||||
|
||||
<form name="setPinForm" novalidate>
|
||||
<form name="setPinForm" ng-model="setPinForm" novalidate>
|
||||
<div class="input" ng-if="askForPin == 1">
|
||||
<input id="newpin" type="tel" ng-model="newpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="PIN" name="newpin" required show-focus="askForPin == 1 && !isWindowsPhoneApp" ng-focus="formFocus()">
|
||||
<i class="icon-locked" ng-hide="isWindowsPhoneApp"></i>
|
||||
</div>
|
||||
<div class="input" ng-if="askForPin == 2">
|
||||
<input id="repeatpin" type="tel" ng-model="repeatpin" class="form-control" ng-maxlength="4" ng-minlength="4" maxlength="4" ng-pattern="/^[0-9]{1,4}$/" placeholder="Confirm your PIN" name="repeatpin" required show-focus="askForPin == 2 && !isWindowsPhoneApp" ng-focus="formFocus()">
|
||||
<i class="icon-locked" ng-hide="isWindowsPhoneApp"></i>
|
||||
<i class="icon-locked"></i>
|
||||
</div>
|
||||
<div class="box-setup-footer row collapse">
|
||||
<div class="large-6 medium-6 small-6 columns">
|
||||
|
@ -236,7 +236,6 @@
|
|||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue