display a spinner when signing with a PIN
This commit is contained in:
parent
e6f02c904e
commit
2be4600509
3 changed files with 6 additions and 1 deletions
|
|
@ -72,6 +72,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc
|
||||||
var credentials = pinService.get(pin, function(err, credentials) {
|
var credentials = pinService.get(pin, function(err, credentials) {
|
||||||
if (err || !credentials) {
|
if (err || !credentials) {
|
||||||
$rootScope.starting = false;
|
$rootScope.starting = false;
|
||||||
|
$scope.loading = null;
|
||||||
$scope.error = 'Wrong PIN';
|
$scope.error = 'Wrong PIN';
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,9 @@ angular.module('copayApp.services')
|
||||||
set: function(newValue) {
|
set: function(newValue) {
|
||||||
this['_' + name] = newValue;
|
this['_' + name] = newValue;
|
||||||
scope.error = null;
|
scope.error = null;
|
||||||
|
scope.loading = null;
|
||||||
if (newValue && newValue.length == 4) {
|
if (newValue && newValue.length == 4) {
|
||||||
|
scope.loading = true;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
return cb(newValue);
|
return cb(newValue);
|
||||||
}, 30);
|
}, 30);
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,9 @@
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<div class="large-6 medium-6 small-6 columns text-right">
|
<div class="large-6 medium-6 small-6 columns text-right">
|
||||||
<button translate type="submit" class="button primary radius expand m0" ng-disabled="pinForm.$invalid || error">
|
<button translate type="submit" class="button primary radius expand m0"
|
||||||
|
ng-disabled="pinForm.$invalid || error || loading">
|
||||||
|
<i class="fi-bitcoin-circle icon-rotate spinner" ng-show="loading"></i>
|
||||||
Sign in
|
Sign in
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue