Fix splash on wp8

This commit is contained in:
Gustavo Maximiliano Cortez 2015-09-16 13:52:28 -03:00
parent 3f996366c6
commit 7f2f85b971
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
2 changed files with 50 additions and 43 deletions

View File

@ -1,4 +1,7 @@
<div class="splash content text-center" ng-if="!index.hasProfile" ng-controller="splashController">
<div class="splash content text-center"
ng-init="init()"
ng-controller="splashController">
<div ng-if="!index.hasProfile">
<div class="row">
<div class="medium-centered small-centered large-centered columns">
<div class="m20t">
@ -36,4 +39,5 @@
<button ng-click="create(true)" class="button round outline dark-gray tiny" translate>Import backup </button>
</div>
</div>
</div>
</div>

View File

@ -1,14 +1,7 @@
'use strict';
angular.module('copayApp.controllers').controller('splashController',
function($scope, $timeout, $log, profileService, storageService, go, bwcService) {
storageService.getCopayDisclaimerFlag(function(err, val) {
if (!val) go.path('disclaimer');
if (profileService.profile) {
go.walletHome();
}
});
function($scope, $timeout, $log, profileService, storageService, go) {
$scope.create = function(noWallet) {
$scope.creatingProfile = true;
@ -29,4 +22,14 @@ angular.module('copayApp.controllers').controller('splashController',
});
}, 100);
};
$scope.init = function() {
storageService.getCopayDisclaimerFlag(function(err, val) {
if (!val) go.path('disclaimer');
if (profileService.profile) {
go.walletHome();
}
});
};
});