Smooth start on mobile
This commit is contained in:
parent
9c5ab4ef2d
commit
a13e12ff07
2 changed files with 37 additions and 25 deletions
|
|
@ -19,11 +19,13 @@
|
||||||
|
|
||||||
<div ng-show="!agreed">
|
<div ng-show="!agreed">
|
||||||
<p translate>I affirm that I have read, understood, and agree with these terms.</p>
|
<p translate>I affirm that I have read, understood, and agree with these terms.</p>
|
||||||
<button class="black round expand" ng-click="agree()">
|
<button class="black round expand" ng-click="agree()" ng-disabled="loading" translate>
|
||||||
<span translate> Agree </span>
|
Agree
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button ng-show="agreed && !index.hasProfile" class="round" ng-click="agree()" translate>Go back</button>
|
<button ng-show="agreed && !index.hasProfile" class="round" translate>
|
||||||
|
Go back
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div class="extra-margin-bottom"></div>
|
<div class="extra-margin-bottom"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -89,19 +89,21 @@ angular
|
||||||
$scope.create = function(noWallet) {
|
$scope.create = function(noWallet) {
|
||||||
$scope.creatingProfile = true;
|
$scope.creatingProfile = true;
|
||||||
|
|
||||||
profileService.create({
|
$timeout(function() {
|
||||||
noWallet: noWallet
|
profileService.create({
|
||||||
}, function(err) {
|
noWallet: noWallet
|
||||||
if (err) {
|
}, function(err) {
|
||||||
$scope.creatingProfile = false;
|
if (err) {
|
||||||
$log.warn(err);
|
$scope.creatingProfile = false;
|
||||||
$scope.error = err;
|
$log.warn(err);
|
||||||
$scope.$apply();
|
$scope.error = err;
|
||||||
$timeout(function() {
|
$scope.$apply();
|
||||||
$scope.create(noWallet);
|
$timeout(function() {
|
||||||
}, 3000);
|
$scope.create(noWallet);
|
||||||
}
|
}, 3000);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +127,7 @@ angular
|
||||||
views: {
|
views: {
|
||||||
'main': {
|
'main': {
|
||||||
templateUrl: 'views/disclaimer.html',
|
templateUrl: 'views/disclaimer.html',
|
||||||
controller: function($scope, $timeout, storageService, applicationService, go) {
|
controller: function($scope, $timeout, storageService, applicationService, go, gettextCatalog, isCordova) {
|
||||||
storageService.getCopayDisclaimerFlag(function(err, val) {
|
storageService.getCopayDisclaimerFlag(function(err, val) {
|
||||||
$scope.agreed = val;
|
$scope.agreed = val;
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
|
|
@ -134,11 +136,20 @@ angular
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.agree = function() {
|
$scope.agree = function() {
|
||||||
storageService.setCopayDisclaimerFlag(function(err) {
|
if (isCordova) {
|
||||||
$timeout(function() {
|
window.plugins.spinnerDialog.show(null, gettextCatalog.getString('Loading...'), true);
|
||||||
applicationService.restart();
|
}
|
||||||
}, 1000);
|
$scope.loading = true;
|
||||||
});
|
$timeout(function() {
|
||||||
|
storageService.setCopayDisclaimerFlag(function(err) {
|
||||||
|
$timeout(function() {
|
||||||
|
if (isCordova) {
|
||||||
|
window.plugins.spinnerDialog.hide();
|
||||||
|
}
|
||||||
|
applicationService.restart();
|
||||||
|
}, 1000);
|
||||||
|
});
|
||||||
|
}, 100);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -630,7 +641,6 @@ angular
|
||||||
cachedBackPanel.getElementsByClassName('content')[0].scrollTop = sc;
|
cachedBackPanel.getElementsByClassName('content')[0].scrollTop = sc;
|
||||||
|
|
||||||
cachedTransitionState = desiredTransitionState;
|
cachedTransitionState = desiredTransitionState;
|
||||||
//console.log('CACHing animation', cachedTransitionState);
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue