diff --git a/js/controllers/home.js b/js/controllers/home.js index eb129934c..e75fe7638 100644 --- a/js/controllers/home.js +++ b/js/controllers/home.js @@ -4,9 +4,9 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc var _credentials, _firstpin; - $scope.init = function() { $scope.isMobile = isMobile.any(); + $scope.attempt=0; // This is only for backwards compat, insight api should link to #!/confirmed directly if (getParam('confirmed')) { @@ -28,6 +28,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc pinService.check(function(err, value) { $rootScope.hasPin = value; }); + $scope.usingLocalStorage = config.plugins.EncryptedLocalStorage; }; pinService.makePinInput($scope, 'pin', function(newValue) { @@ -139,6 +140,12 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc copay.logger.warn(err); if ((err.toString() || '').match('PNOTFOUND')) { $scope.error = 'Invalid email or password'; + + if($scope.attempt++>1) { + var storage = $scope.usingLocalStorage ? 'this device storage' : 'cloud storage'; + $scope.error = 'Invalid email or password. You are trying to sign in using ' + storage + '. Change it on settings is necessary.'; + }; + pinService.clear(function() { }); } else if ((err.toString() || '').match('Connection')) { diff --git a/views/home.html b/views/home.html index 5cd897e3e..515d43e2d 100644 --- a/views/home.html +++ b/views/home.html @@ -3,10 +3,18 @@
-
 
-
 
-
 
-
 
+
+
 
+
+
+
 
+
+
+
 
+
+
+
 
+
Accessing your profile...
@@ -34,7 +42,6 @@

Your email was confimed!

- Please sign in to access your wallets
@@ -43,36 +50,30 @@ Copay now needs a profile to access wallets. - You can import your current wallets after + You can import your current wallets after creating your profile

Set up a PIN ?

-

Enter a 4-digit number for easier access from this device

- +

Enter a 4-digit number for easier access from this device

+
-
+
{{error|translate}}
-
+
- +
- +
@@ -83,15 +84,14 @@
-
- -
+ +
@@ -100,17 +100,14 @@
-
+
{{error|translate}}
- +
@@ -122,41 +119,40 @@
-
- - + + -

Sign in to Copay

-

- - {{error|translate}} -

+

+ {{error|translate}} +

- +
- +
- -
+
+ * Using this device storage. Change to cloud storage on 'settings'. +
+ + +