Merge pull request #1806 from cmgustavo/ui/layout-signin

Show HomeWallet immediately the when profile was started
This commit is contained in:
Matias Alejo Garcia 2014-11-13 21:02:51 -03:00
commit bbe2b37911
9 changed files with 9 additions and 10 deletions

View File

@ -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>

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}

View File

@ -4,6 +4,7 @@ angular.module('copayApp.controllers').controller('HomeWalletController',
function($scope, $rootScope, $timeout, $modal, controllerUtils) {
controllerUtils.redirIfNotComplete();
$rootScope.starting = false;
$rootScope.title = 'Home';
}

View File

@ -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;

View File

@ -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';

View File

@ -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">

View File

@ -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>