mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #1806 from cmgustavo/ui/layout-signin
Show HomeWallet immediately the when profile was started
This commit is contained in:
commit
bbe2b37911
|
@ -74,7 +74,7 @@
|
|||
ng-include="'views/includes/head.html'"
|
||||
ng-if="$root.iden"></div>
|
||||
|
||||
<section ng-class="{'main' : $root.iden && $root.iden.listWallets().length>=0}" ng-view></section>
|
||||
<section ng-class="{'main':$root.iden && !$root.starting}" ng-view></section>
|
||||
|
||||
<a class="exit-off-canvas"></a>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ angular.module('copayApp.controllers').controller('HomeWalletController',
|
|||
function($scope, $rootScope, $timeout, $modal, controllerUtils) {
|
||||
|
||||
controllerUtils.redirIfNotComplete();
|
||||
$rootScope.starting = false;
|
||||
$rootScope.title = 'Home';
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<i class="size-60 fi-bitcoin-circle icon-rotate spinner"></i>
|
||||
<span translate>Creating wallet...</span>
|
||||
</div>
|
||||
<div class="setup" ng-show="!loading">
|
||||
<div class="setup" ng-show="!loading && !$root.starting">
|
||||
<h1 class="hide-for-large-up">{{$root.title}}</h1>
|
||||
<form name="setupForm" ng-submit="create(setupForm)" novalidate>
|
||||
<div class="row">
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<div class="home" ng-controller="HomeController">
|
||||
|
||||
<div data-alert class="loading-screen" ng-show="loading">
|
||||
<div data-alert class="loading-screen" ng-show="$root.starting">
|
||||
<i class="size-60 fi-bitcoin-circle icon-rotate spinner"></i>
|
||||
<span translate>Accessing your profile...</span>
|
||||
</div>
|
||||
<div class="large-4 large-centered medium-6 medium-centered columns" ng-if="!loading && !retreiving">
|
||||
<div class="large-4 large-centered medium-6 medium-centered columns" ng-show="!$root.starting">
|
||||
<div class="logo-setup">
|
||||
<img src="img/logo-negative-beta.svg" alt="Copay" width="146" height="59">
|
||||
<div ng-include="'views/includes/version.html'"></div>
|
||||
|
|
Loading…
Reference in New Issue