remove main tabs from import view in onboarding flow

This commit is contained in:
Gabriel Bazán 2016-09-01 15:21:18 -03:00
commit 657c2b830c
5 changed files with 85 additions and 27 deletions

View file

@ -3,7 +3,7 @@
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $log, $ionicPopup, profileService) {
$scope.goImport = function(code) {
$state.go('tabs.import', {
$state.go('onboarding.import.phrase', {
fromOnboarding: true,
code: code
});

View file

@ -1,21 +1,27 @@
'use strict';
angular.module('copayApp.controllers').controller('tabsController', function($log, $scope, $ionicModal, incomingData) {
angular.module('copayApp.controllers').controller('tabsController', function($log, $scope, $stateParams, $ionicModal, $timeout, incomingData) {
$scope.onScan = function(data) {
console.log('[tabsController.js.6:data:]',data); //TODO
if (!incomingData.redir(data)) {
$ionicPopup.alert({
title: 'Invalid data',
});
}
$scope.onScan = function(data) {
if (!incomingData.redir(data)) {
$ionicPopup.alert({
title: 'Invalid data',
});
}
}
$scope.setScanFn = function(scanFn) {
$scope.scan = function() {
$log.debug('Scanning...');
scanFn();
};
$scope.setScanFn = function(scanFn) {
$scope.scan = function() {
$log.debug('Scanning...');
scanFn();
};
});
};
$scope.importInit = function() {
$scope.fromOnboarding = $stateParams.fromOnboarding;
$timeout(function() {
$scope.$apply();
}, 1);
}
});

View file

@ -631,6 +631,42 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
}
}
})
.state('onboarding.import', {
url: '/import/:fromOnboarding',
abstract: true,
views: {
'onboarding': {
templateUrl: 'views/import.html'
},
},
params: {
code: null
},
})
.state('onboarding.import.phrase', {
url: '/tab-import-phrase',
views: {
'tab-import-phrase': {
templateUrl: 'views/tab-import-phrase.html',
},
}
})
.state('onboarding.import.file', {
url: '/tab-import-file',
views: {
'tab-import-file': {
templateUrl: 'views/tab-import-file.html',
},
}
})
.state('onboarding.import.hardware', {
url: '/tab-import-hardware',
views: {
'tab-import-hardware': {
templateUrl: 'views/tab-import-hardware.html',
},
}
})
/*
*