From 183d6ec15c0bb180db617ecaad260b93e08f862c Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 13 Nov 2014 18:54:30 -0300 Subject: [PATCH] Show HomeWallet immediately the when profile was started --- index.html | 2 +- js/controllers/create.js | 1 + js/controllers/createProfile.js | 2 +- js/controllers/home.js | 3 +-- js/controllers/homeWallet.js | 1 + js/controllers/importProfile.js | 2 +- js/services/identityService.js | 2 -- views/create.html | 2 +- views/home.html | 4 ++-- 9 files changed, 9 insertions(+), 10 deletions(-) diff --git a/index.html b/index.html index 2e632de92..051f6fa33 100644 --- a/index.html +++ b/index.html @@ -74,7 +74,7 @@ ng-include="'views/includes/head.html'" ng-if="$root.iden"> -
+
diff --git a/js/controllers/create.js b/js/controllers/create.js index 311c12d6d..64ee88bcf 100644 --- a/js/controllers/create.js +++ b/js/controllers/create.js @@ -4,6 +4,7 @@ angular.module('copayApp.controllers').controller('CreateController', function($scope, $rootScope, $location, $timeout, controllerUtils, backupService, notification, defaults) { $rootScope.fromSetup = true; + $rootScope.starting = false; $scope.loading = false; $scope.walletPassword = $rootScope.walletPassword; $scope.isMobile = !!window.cordova; diff --git a/js/controllers/createProfile.js b/js/controllers/createProfile.js index c59a4fe1a..824c9a0ce 100644 --- a/js/controllers/createProfile.js +++ b/js/controllers/createProfile.js @@ -8,7 +8,7 @@ angular.module('copayApp.controllers').controller('CreateProfileController', fun $scope.error('Error', 'Please enter the required fields'); return; } - $scope.loading = true; + $rootScope.starting = true; identityService.create($scope, form); } diff --git a/js/controllers/home.js b/js/controllers/home.js index 1ab45ea4b..7ba16d389 100644 --- a/js/controllers/home.js +++ b/js/controllers/home.js @@ -18,7 +18,6 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc $rootScope.fromEmailConfirmation = false; } - $scope.retreiving = false; Compatibility.check($scope); $scope.openProfile = function(form) { @@ -27,7 +26,7 @@ angular.module('copayApp.controllers').controller('HomeController', function($sc $scope.error = 'Please enter the required fields'; return; } - $scope.loading = true; + $rootScope.starting = true; identityService.open($scope, form); } diff --git a/js/controllers/homeWallet.js b/js/controllers/homeWallet.js index 2dcc6e0a2..ad25cd973 100644 --- a/js/controllers/homeWallet.js +++ b/js/controllers/homeWallet.js @@ -4,6 +4,7 @@ angular.module('copayApp.controllers').controller('HomeWalletController', function($scope, $rootScope, $timeout, $modal, controllerUtils) { controllerUtils.redirIfNotComplete(); + $rootScope.starting = false; $rootScope.title = 'Home'; } diff --git a/js/controllers/importProfile.js b/js/controllers/importProfile.js index 979a880b6..b0a577309 100644 --- a/js/controllers/importProfile.js +++ b/js/controllers/importProfile.js @@ -54,13 +54,13 @@ angular.module('copayApp.controllers').controller('ImportProfileController', }; $scope.import = function(form) { - $scope.loading = true; if (form.$invalid) { $scope.loading = false; $scope.error = 'Please enter the required fields'; return; } + $rootScope.starting = true; var backupFile = $scope.file; var backupText = form.backupText.$modelValue; diff --git a/js/services/identityService.js b/js/services/identityService.js index 214becb83..12903108e 100644 --- a/js/services/identityService.js +++ b/js/services/identityService.js @@ -33,7 +33,6 @@ angular.module('copayApp.services') passphraseConfig: config.passphraseConfig, failIfExists: true, }, function(err, iden) { - scope.loading = false; if (err || !iden) { copay.logger.debug(err); if (err && (err.match('EEXISTS') || err.match('BADCREDENTIALS'))) { @@ -78,7 +77,6 @@ angular.module('copayApp.services') walletDefaults: config.wallet, passphraseConfig: config.passphraseConfig, }, function(err, iden) { - scope.loading = false; if (err && !iden) { if ((err.toString() || '').match('PNOTFOUND')) { scope.error = 'Invalid email or password'; diff --git a/views/create.html b/views/create.html index 85396b9b0..7d0efdad3 100644 --- a/views/create.html +++ b/views/create.html @@ -3,7 +3,7 @@ Creating wallet... -
+

{{$root.title}}

diff --git a/views/home.html b/views/home.html index e069a4d33..a87977a63 100644 --- a/views/home.html +++ b/views/home.html @@ -1,10 +1,10 @@
-
+
Accessing your profile...
-
+
Copay