Removes createProfile page. Fixes transition from splash to walletHome
This commit is contained in:
parent
4e092f33ba
commit
cb7c0bd19d
5 changed files with 46 additions and 71 deletions
|
|
@ -30,8 +30,7 @@
|
||||||
<div id="mainSection">
|
<div id="mainSection">
|
||||||
<section ui-view="main"
|
<section ui-view="main"
|
||||||
ng-class="{
|
ng-class="{
|
||||||
'main': index.hasProfile,
|
'main': index.hasProfile
|
||||||
'main-dark': mainDark,
|
|
||||||
}"></section>
|
}"></section>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
<div
|
|
||||||
ng-controller="createProfileController as cp">
|
|
||||||
|
|
||||||
<div class="text-center logo-setup p20">
|
|
||||||
<img src="img/logo.svg" alt="Copay" width="150">
|
|
||||||
<div ng-include="'views/includes/version.html'"></div>
|
|
||||||
</div>
|
|
||||||
<div class="text-center size-12 text-warning" ng-show="cp.error">
|
|
||||||
{{(cp.error)|translate}}. <span translate>Retrying...</span>
|
|
||||||
</div>
|
|
||||||
<div class="onGoingProcess" ng-show="cp.creatingProfile">
|
|
||||||
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
|
|
||||||
<div class="spinner">
|
|
||||||
<div class="rect1"></div>
|
|
||||||
<div class="rect2"></div>
|
|
||||||
<div class="rect3"></div>
|
|
||||||
<div class="rect4"></div>
|
|
||||||
<div class="rect5"></div>
|
|
||||||
</div>
|
|
||||||
<span translate>Creating Wallet...</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="extra-margin-bottom"></div>
|
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="text-center splash">
|
<div class="text-center splash" ng-if="!hasProfile">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="medium-6 large-4 medium-centered small-centered large-centered columns">
|
<div class="medium-6 large-4 medium-centered small-centered large-centered columns">
|
||||||
<div class="p20">
|
<div class="p20">
|
||||||
|
|
@ -10,7 +10,22 @@
|
||||||
<div class="gif-splash">
|
<div class="gif-splash">
|
||||||
<img src="img/icon-splash.png" alt="icon" width="25%">
|
<img src="img/icon-splash.png" alt="icon" width="25%">
|
||||||
</div>
|
</div>
|
||||||
<div class="row columns start-button">
|
<div class="text-center size-12 text-warning" ng-show="error && !creatingProfile">
|
||||||
<button ng-click="$root.go('createProfile')" class="button black expand radius size-12 text-spacing" translate> GET STARTED </button>
|
{{(error)|translate}}. <span translate>Retrying...</span>
|
||||||
|
</div>
|
||||||
|
<div class="onGoingProcess" ng-show="creatingProfile">
|
||||||
|
<div class="onGoingProcess-content" ng-style="{'background-color':'#222'}">
|
||||||
|
<div class="spinner">
|
||||||
|
<div class="rect1"></div>
|
||||||
|
<div class="rect2"></div>
|
||||||
|
<div class="rect3"></div>
|
||||||
|
<div class="rect4"></div>
|
||||||
|
<div class="rect5"></div>
|
||||||
|
</div>
|
||||||
|
<span translate>Creating Wallet...</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row columns start-button" ng-show="!creatingProfile">
|
||||||
|
<button ng-click="create()" class="button black expand radius size-12 text-spacing" translate> GET STARTED </button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
'use strict';
|
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('createProfileController', function($rootScope, $scope, $log, $timeout, profileService, go) {
|
|
||||||
var self = this;
|
|
||||||
|
|
||||||
if (profileService.profile)
|
|
||||||
go.walletHome();
|
|
||||||
|
|
||||||
self.creatingProfile = true;
|
|
||||||
|
|
||||||
$timeout(function() {
|
|
||||||
profileService.create(function(err) {
|
|
||||||
if (err) {
|
|
||||||
self.creatingProfile = false;
|
|
||||||
$log.warn(err);
|
|
||||||
self.error = err;
|
|
||||||
$scope.$apply();
|
|
||||||
$timeout(function() {
|
|
||||||
go.reload();
|
|
||||||
}, 3000);
|
|
||||||
} else {
|
|
||||||
go.walletHome();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}, 100);
|
|
||||||
});
|
|
||||||
|
|
@ -68,7 +68,33 @@ angular
|
||||||
needProfile: false,
|
needProfile: false,
|
||||||
views: {
|
views: {
|
||||||
'main': {
|
'main': {
|
||||||
templateUrl: 'views/splash/1.html'
|
templateUrl: 'views/splash/1.html',
|
||||||
|
controller: function($scope, $timeout, $log, profileService, go) {
|
||||||
|
if (profileService.profile) {
|
||||||
|
$scope.hasProfile = true;
|
||||||
|
go.walletHome();
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.create = function() {
|
||||||
|
$scope.creatingProfile = true;
|
||||||
|
|
||||||
|
profileService.create(function(err) {
|
||||||
|
if (err) {
|
||||||
|
$scope.creatingProfile = false;
|
||||||
|
$log.warn(err);
|
||||||
|
$scope.error = err;
|
||||||
|
$scope.$apply();
|
||||||
|
$timeout(function() {
|
||||||
|
$scope.create();
|
||||||
|
}, 3000);
|
||||||
|
} else {
|
||||||
|
$timeout(function(){
|
||||||
|
go.walletHome();
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -82,20 +108,6 @@ angular
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('createProfile', {
|
|
||||||
url: '/createProfile',
|
|
||||||
needProfile: false,
|
|
||||||
views: {
|
|
||||||
'main': {
|
|
||||||
templateUrl: 'views/createProfile.html',
|
|
||||||
controller: function($scope) {
|
|
||||||
// TODO
|
|
||||||
// $scope.mainDark = true;
|
|
||||||
$scope.noColor = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.state('unsupported', {
|
.state('unsupported', {
|
||||||
url: '/unsupported',
|
url: '/unsupported',
|
||||||
needProfile: false,
|
needProfile: false,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue