From 2be4600509509678d8705f08feb4fc330078b81c Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Mon, 8 Dec 2014 12:58:05 -0300 Subject: [PATCH] display a spinner when signing with a PIN --- js/controllers/home.js | 1 + js/services/pinService.js | 2 ++ views/home.html | 4 +++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/js/controllers/home.js b/js/controllers/home.js index 81a65e3e0..9a2d99e17 100644 --- a/js/controllers/home.js +++ b/js/controllers/home.js @@ -72,6 +72,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc var credentials = pinService.get(pin, function(err, credentials) { if (err || !credentials) { $rootScope.starting = false; + $scope.loading = null; $scope.error = 'Wrong PIN'; return; } diff --git a/js/services/pinService.js b/js/services/pinService.js index 914bdcee8..726a2b4f4 100644 --- a/js/services/pinService.js +++ b/js/services/pinService.js @@ -57,7 +57,9 @@ angular.module('copayApp.services') set: function(newValue) { this['_' + name] = newValue; scope.error = null; + scope.loading = null; if (newValue && newValue.length == 4) { + scope.loading = true; $timeout(function() { return cb(newValue); }, 30); diff --git a/views/home.html b/views/home.html index 060c95058..ceb1f7bcc 100644 --- a/views/home.html +++ b/views/home.html @@ -103,7 +103,9 @@
-