Fix onboarding params, buttons, states

This commit is contained in:
Gustavo Maximiliano Cortez 2016-09-02 15:42:45 -03:00
commit 2fccd89c3a
No known key found for this signature in database
GPG key ID: 15EDAD8D9F2EB1AF
12 changed files with 36 additions and 35 deletions

View file

@ -1,7 +1,8 @@
'use strict';
angular.module('copayApp.controllers').controller('backupRequestController', function($scope, $state, $ionicPopup) {
angular.module('copayApp.controllers').controller('backupRequestController', function($scope, $state, $stateParams, $ionicPopup) {
$scope.walletId = $stateParams.walletId;
$scope.openPopup = function() {
var backupLaterPopup = $ionicPopup.show({
templateUrl: "views/includes/backupLaterPopup.html",

View file

@ -1,7 +1,8 @@
'use strict';
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $ionicPopup, $stateParams, profileService) {
angular.module('copayApp.controllers').controller('backupWarningController', function($scope, $state, $stateParams, $ionicPopup, profileService) {
$scope.walletId = $stateParams.walletId;
$scope.openPopup = function() {
var backupWarningPopup = $ionicPopup.show({
templateUrl: "views/includes/backupWarningPopup.html",
@ -10,7 +11,7 @@ angular.module('copayApp.controllers').controller('backupWarningController', fun
$scope.close = function() {
backupWarningPopup.close();
$state.go('onboarding.backup');
$state.go('onboarding.backup', {walletId: $stateParams.walletId, fromOnboarding: true});
};
}
});

View file

@ -1,6 +1,6 @@
'use strict';
angular.module('copayApp.controllers').controller('collectEmailController', function($scope, $state, $stateParams, profileService, configService, walletService, platformInfo) {
angular.module('copayApp.controllers').controller('collectEmailController', function($scope, $state, $stateParams, $ionicScrollDelegate, profileService, configService, walletService, platformInfo) {
var isCordova = platformInfo.isCordova;
var isWP = platformInfo.isWP;
@ -25,13 +25,13 @@ angular.module('copayApp.controllers').controller('collectEmailController', func
if (err) $log.warn(err);
configService.set(opts, function(err) {
if (err) $log.warn(err);
if (!usePushNotifications) $state.go('onboarding.backupRequest');
else $state.go('onboarding.notifications');
if (!usePushNotifications) $state.go('onboarding.backupRequest', {walletId: walletId});
else $state.go('onboarding.notifications', {walletId: walletId});
});
});
};
$scope.onboardingMailSkip = function() {
$state.go('onboarding.backupRequest');
$state.go('onboarding.backupRequest', {walletId: walletId});
};
});

View file

@ -1,7 +1,9 @@
'use strict';
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, profileService) {
angular.module('copayApp.controllers').controller('notificationsController', function($scope, $state, $stateParams, profileService) {
console.log('[notifications.js:3]',$stateParams); //TODO
$scope.walletId = $stateParams.walletId;
$scope.allowNotif = function() {
profileService.pushNotificationsInit();
$state.go('onboarding.backupRequest');

View file

@ -560,11 +560,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
.state('onboarding', {
url: '/onboarding',
abstract: true,
template: '<ion-nav-view name="onboarding"></ion-nav-view>',
params: {
walletId: null,
fromOnboarding: null,
},
template: '<ion-nav-view name="onboarding"></ion-nav-view>'
})
.state('onboarding.welcome', {
url: '/welcome',
@ -583,7 +579,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
.state('onboarding.collectEmail', {
url: '/collectEmail',
url: '/collectEmail/:walletId',
views: {
'onboarding': {
templateUrl: 'views/onboarding/collectEmail.html'
@ -591,7 +587,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
.state('onboarding.notifications', {
url: '/notifications',
url: '/notifications/:walletId',
views: {
'onboarding': {
templateUrl: 'views/onboarding/notifications.html'
@ -599,7 +595,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
.state('onboarding.backupRequest', {
url: '/backupRequest',
url: '/backupRequest/:walletId',
views: {
'onboarding': {
templateUrl: 'views/onboarding/backupRequest.html'
@ -607,7 +603,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
.state('onboarding.backupWarning', {
url: '/backupWarning',
url: '/backupWarning/:walletId',
views: {
'onboarding': {
templateUrl: 'views/onboarding/backupWarning.html'
@ -615,7 +611,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
})
.state('onboarding.backup', {
url: '/backup',
url: '/backup/:walletId/:fromOnboarding',
views: {
'onboarding': {
templateUrl: 'views/backup.html'
@ -647,7 +643,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
},
},
params: {
code: null
code: null,
fromOnboarding: null
},
})
.state('onboarding.import.phrase', {

View file

@ -11,7 +11,7 @@
opacity: 1;
background: #fff;
color: rgb(108, 108, 108);
height: 11rem;
height: 13rem;
animation-name: topBottom;
animation-iteration-count: 1;
animation-timing-function: ease-in;
@ -22,6 +22,7 @@
animation-fill-mode: forwards;
z-index: 5;
margin-top: 0;
width: 100%;
label {
background: rgba(200, 200, 200, 0.20);
height: 3rem;

View file

@ -34,7 +34,7 @@
background-size: contain;
width: 100%;
clear: both;
height: 20rem;
height: 23rem;
margin-bottom: -3rem;
background-position: center;
background-repeat: no-repeat;