license and profile creation in the same view
This commit is contained in:
parent
95217cef02
commit
b1d4e6224c
5 changed files with 97 additions and 133 deletions
|
|
@ -7,7 +7,6 @@
|
|||
font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||
}
|
||||
|
||||
|
||||
.panel h1, .panel h2, .panel h3, .panel h4, .panel h5, .panel h6, .panel p, .panel li, .panel dl {
|
||||
color: #2C3E50;
|
||||
}
|
||||
|
|
@ -1094,6 +1093,10 @@ input.ng-invalid-match, input.ng-invalid-match:focus {
|
|||
}
|
||||
|
||||
/*/////////////////////////////////////////////////*/
|
||||
.scrollArea {
|
||||
height: 280px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.tabbable {
|
||||
border: 2px solid #213140;
|
||||
|
|
|
|||
|
|
@ -1,29 +1,44 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('disclaimerController',
|
||||
function($scope, $timeout, storageService, applicationService, gettextCatalog, isCordova, uxLanguage) {
|
||||
function($scope, $timeout, $log, profileService, isCordova, storageService, gettextCatalog, uxLanguage, go) {
|
||||
|
||||
$scope.agree = function() {
|
||||
$scope.create = function(noWallet) {
|
||||
$scope.creatingProfile = true;
|
||||
if (isCordova) {
|
||||
window.plugins.spinnerDialog.show(null, gettextCatalog.getString('Loading...'), true);
|
||||
}
|
||||
$scope.loading = true;
|
||||
$timeout(function() {
|
||||
storageService.setCopayDisclaimerFlag(function(err) {
|
||||
$timeout(function() {
|
||||
if (isCordova) {
|
||||
window.plugins.spinnerDialog.hide();
|
||||
if (isCordova) {
|
||||
window.plugins.spinnerDialog.hide();
|
||||
}
|
||||
profileService.create({
|
||||
noWallet: noWallet
|
||||
}, function(err) {
|
||||
if (err) {
|
||||
$scope.creatingProfile = false;
|
||||
$log.warn(err);
|
||||
$scope.error = err;
|
||||
$scope.$apply();
|
||||
$timeout(function() {
|
||||
$scope.create(noWallet);
|
||||
}, 3000);
|
||||
}
|
||||
applicationService.restart();
|
||||
}, 1000);
|
||||
});
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
|
||||
$scope.init = function() {
|
||||
storageService.getCopayDisclaimerFlag(function(err, val) {
|
||||
$scope.lang = uxLanguage.currentLanguage;
|
||||
$scope.agreed = val;
|
||||
|
||||
if (profileService.profile) {
|
||||
go.walletHome();
|
||||
}
|
||||
$timeout(function() {
|
||||
$scope.$digest();
|
||||
}, 1);
|
||||
|
|
|
|||
|
|
@ -1,35 +0,0 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('splashController',
|
||||
function($scope, $timeout, $log, profileService, storageService, go) {
|
||||
|
||||
$scope.create = function(noWallet) {
|
||||
$scope.creatingProfile = true;
|
||||
|
||||
$timeout(function() {
|
||||
profileService.create({
|
||||
noWallet: noWallet
|
||||
}, function(err) {
|
||||
if (err) {
|
||||
$scope.creatingProfile = false;
|
||||
$log.warn(err);
|
||||
$scope.error = err;
|
||||
$scope.$apply();
|
||||
$timeout(function() {
|
||||
$scope.create(noWallet);
|
||||
}, 3000);
|
||||
}
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
$scope.init = function() {
|
||||
storageService.getCopayDisclaimerFlag(function(err, val) {
|
||||
if (!val) go.path('disclaimer');
|
||||
|
||||
if (profileService.profile) {
|
||||
go.walletHome();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue