Merge pull request #370 from gabrielbazan7/fix/resume
if no wallet resume welcome - if no disclaimer accepted resume disclaimer
This commit is contained in:
commit
c38d0ed221
6 changed files with 28609 additions and 40 deletions
11968
public/css/copay.css
Normal file
11968
public/css/copay.css
Normal file
File diff suppressed because it is too large
Load diff
16611
public/js/copay.js
Normal file
16611
public/js/copay.js
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -6,6 +6,7 @@ angular.module('copayApp.controllers').controller('disclaimerController', functi
|
|||
$scope.terms = {};
|
||||
$scope.accept1 = $scope.accept2 = $scope.accept3 = false;
|
||||
$scope.backedUp = $stateParams.backedUp;
|
||||
$scope.resume = $stateParams.resume;
|
||||
$timeout(function() {
|
||||
$scope.$apply();
|
||||
}, 1);
|
||||
|
|
@ -35,8 +36,10 @@ angular.module('copayApp.controllers').controller('disclaimerController', functi
|
|||
});
|
||||
};
|
||||
|
||||
$scope.goBack = function(){
|
||||
$state.go('onboarding.backupRequest', {walletId: $stateParams.walletId});
|
||||
$scope.goBack = function() {
|
||||
$state.go('onboarding.backupRequest', {
|
||||
walletId: $stateParams.walletId
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -689,7 +689,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
})
|
||||
.state('onboarding.disclaimer', {
|
||||
url: '/disclaimer/:walletId/:backedUp',
|
||||
url: '/disclaimer/:walletId/:backedUp/:resume',
|
||||
views: {
|
||||
'onboarding': {
|
||||
templateUrl: 'views/onboarding/disclaimer.html'
|
||||
|
|
@ -840,13 +840,13 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
})
|
||||
|
||||
/*
|
||||
*
|
||||
* BitPay Card
|
||||
*
|
||||
*/
|
||||
/*
|
||||
*
|
||||
* BitPay Card
|
||||
*
|
||||
*/
|
||||
|
||||
.state('tabs.bitpayCard', {
|
||||
.state('tabs.bitpayCard', {
|
||||
url: '/bitpay-card',
|
||||
views: {
|
||||
'tab-home@tabs': {
|
||||
|
|
@ -973,21 +973,21 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
$log.debug('No profile... redirecting');
|
||||
$state.go('onboarding.welcome');
|
||||
} else if (err.message && err.message.match('NONAGREEDDISCLAIMER')) {
|
||||
$log.debug('Display disclaimer... redirecting');
|
||||
storageService.getLastState(function(err, state) {
|
||||
if (err && !state) {
|
||||
$log.error(err);
|
||||
$state.go('onboarding.disclaimer');
|
||||
}
|
||||
else {
|
||||
var state = JSON.parse(state);
|
||||
$state.go(state.name, state.toParams);
|
||||
}
|
||||
})
|
||||
if (lodash.isEmpty(profileService.getWallets())) {
|
||||
$log.debug('No wallets and no disclaimer... redirecting');
|
||||
$state.go('onboarding.welcome');
|
||||
}
|
||||
else {
|
||||
$log.debug('Display disclaimer... redirecting');
|
||||
$state.go('onboarding.disclaimer', {
|
||||
resume: true
|
||||
});
|
||||
}
|
||||
} else {
|
||||
throw new Error(err); // TODO
|
||||
}
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
profileService.storeProfileIfDirty();
|
||||
$log.debug('Profile loaded ... Starting UX.');
|
||||
scannerService.gentleInitialize();
|
||||
|
|
@ -1014,11 +1014,5 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
$log.debug('Route change from:', fromState.name || '-', ' to:', toState.name);
|
||||
$log.debug(' toParams:' + JSON.stringify(toParams || {}));
|
||||
$log.debug(' fromParams:' + JSON.stringify(fromParams || {}));
|
||||
|
||||
if (!toState.name.match(/onboarding/)) return;
|
||||
var state = {};
|
||||
state.name = toState.name;
|
||||
state.toParams = toParams;
|
||||
if (state.name != 'starting') storageService.setLastState(JSON.stringify(state), function() {});
|
||||
});
|
||||
});
|
||||
|
|
|
|||
|
|
@ -199,9 +199,9 @@ angular.module('copayApp.services')
|
|||
storage.get('homeTip', cb);
|
||||
};
|
||||
|
||||
root.setHomeTipAccepted = function(val, cb) {
|
||||
storage.set('homeTip', val, cb);
|
||||
};
|
||||
root.setHomeTipAccepted = function(val, cb) {
|
||||
storage.set('homeTip', val, cb);
|
||||
};
|
||||
|
||||
root.setHideBalanceFlag = function(walletId, val, cb) {
|
||||
storage.set('hideBalance-' + walletId, val, cb);
|
||||
|
|
@ -284,14 +284,6 @@ angular.module('copayApp.services')
|
|||
storage.remove('nextStep-' + service, cb);
|
||||
};
|
||||
|
||||
root.setLastState = function(state, toParams, cb) {
|
||||
storage.set('lastState', state, toParams, cb);
|
||||
};
|
||||
|
||||
root.getLastState = function(cb) {
|
||||
storage.get('lastState', cb);
|
||||
};
|
||||
|
||||
root.checkQuota = function() {
|
||||
var block = '';
|
||||
// 50MB
|
||||
|
|
|
|||
|
|
@ -9,8 +9,9 @@
|
|||
</ion-nav-bar>
|
||||
<ion-content scroll="false" ng-class="{'has-header': backedUp == 'false'}">
|
||||
<div id="onboarding-disclaimer-container">
|
||||
<div class="onboarding-topic" id="disclaimer-topic">Almost done! Let's review.</div>
|
||||
<div class="onboarding-description" id="disclaimer-description">Bitcoin is different – it cannot be safely held with a bank or web service.</div>
|
||||
<div ng-show="resume" class="onboarding-topic" id="disclaimer-topic" translate>Quick review!</div>
|
||||
<div ng-show="!resume" class="onboarding-topic" id="disclaimer-topic" translate>Almost done! Let's review.</div>
|
||||
<div class="onboarding-description" id="disclaimer-description" translate>Bitcoin is different – it cannot be safely held with a bank or web service.</div>
|
||||
<ion-list>
|
||||
<ion-checkbox ng-model="accept1">
|
||||
<span translate>I understand that my funds are held securely on this device, not by a company.</span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue