diff --git a/src/js/controllers/backController.js b/src/js/controllers/backController.js index 510354649..a0bd6766f 100644 --- a/src/js/controllers/backController.js +++ b/src/js/controllers/backController.js @@ -3,7 +3,7 @@ angular.module('copayApp.controllers').controller('backController', function($scope, $state, $stateParams) { $scope.importGoBack = function() { - if ($stateParams.fromOnboarding) $state.go('onboarding.welcome'); + if ($stateParams.fromOnboarding) $state.go('onboarding.tour'); else $state.go('tabs.add'); }; diff --git a/src/js/controllers/onboarding/tour.js b/src/js/controllers/onboarding/tour.js index 15baac60a..36a366bb1 100644 --- a/src/js/controllers/onboarding/tour.js +++ b/src/js/controllers/onboarding/tour.js @@ -1,6 +1,6 @@ 'use strict'; angular.module('copayApp.controllers').controller('tourController', - function($scope, $state, $log, $timeout, $filter, ongoingProcess, profileService, rateService, popupService, gettextCatalog) { + function($scope, $state, $log, $timeout, $filter, ongoingProcess, profileService, rateService, popupService, gettextCatalog, startupService, storageService) { $scope.data = { index: 0 @@ -13,15 +13,16 @@ angular.module('copayApp.controllers').controller('tourController', spaceBetween: 100 } - $scope.$on("$ionicSlides.sliderInitialized", function(event, data) { - $scope.slider = data.slider; + $scope.$on("$ionicView.afterEnter", function() { + startupService.ready(); }); - $scope.$on("$ionicSlides.slideChangeStart", function(event, data) { - $scope.data.index = data.slider.activeIndex; - }); - - $scope.$on("$ionicSlides.slideChangeEnd", function(event, data) {}); + $scope.createProfile = function() { + $log.debug('Creating profile'); + profileService.createProfile(function(err) { + if (err) $log.warn(err); + }); + }; $scope.$on("$ionicView.enter", function(event, data) { rateService.whenAvailable(function() { @@ -73,14 +74,4 @@ angular.module('copayApp.controllers').controller('tourController', }); }, 300); }; - - $scope.goBack = function() { - if ($scope.data.index != 0) $scope.slider.slidePrev(); - else $state.go('onboarding.welcome'); - } - - $scope.slideNext = function() { - if ($scope.data.index != 2) $scope.slider.slideNext(); - else $state.go('onboarding.welcome'); - } }); diff --git a/src/js/controllers/onboarding/welcomeController.js b/src/js/controllers/onboarding/welcomeController.js deleted file mode 100644 index 3b92d5d22..000000000 --- a/src/js/controllers/onboarding/welcomeController.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService, startupService, storageService) { - - $scope.$on("$ionicView.afterEnter", function() { - startupService.ready(); - }); - - $scope.$on("$ionicView.enter", function() { - $ionicConfig.views.swipeBackEnabled(false); - }); - - $scope.$on("$ionicView.beforeLeave", function() { - $ionicConfig.views.swipeBackEnabled(true); - }); - - $scope.createProfile = function() { - $log.debug('Creating profile'); - profileService.createProfile(function(err) { - if (err) $log.warn(err); - }); - }; - -}); diff --git a/src/js/routes.js b/src/js/routes.js index 8afe69e85..61b4ace81 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -755,15 +755,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr abstract: true, template: '' }) - .state('onboarding.welcome', { - url: '/welcome', - views: { - 'onboarding': { - templateUrl: 'views/onboarding/welcome.html', - controller: 'welcomeController' - } - } - }) .state('onboarding.tour', { url: '/tour', views: { @@ -1228,11 +1219,10 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr var fromTabs = matchHome | matchReceive | matchScan | matchSend | matchSettings; //onboarding with no back views - var matchWelcome = $ionicHistory.currentStateName() == 'onboarding.welcome' ? true : false; var matchCollectEmail = $ionicHistory.currentStateName() == 'onboarding.collectEmail' ? true : false; var noBackView = $ionicHistory.backView().stateName == 'starting' ? true : false; - var fromOnboarding = matchCollectEmail | matchWelcome ; + var fromOnboarding = matchCollectEmail ; //views with disable backbutton var matchComplete = $ionicHistory.currentStateName() == 'tabs.rate.complete' ? true : false; @@ -1277,11 +1267,11 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr if (err) { if (err.message && err.message.match('NOPROFILE')) { $log.debug('No profile... redirecting'); - $state.go('onboarding.welcome'); + $state.go('onboarding.tour'); } else if (err.message && err.message.match('NONAGREEDDISCLAIMER')) { if (lodash.isEmpty(profileService.getWallets())) { $log.debug('No wallets and no disclaimer... redirecting'); - $state.go('onboarding.welcome'); + $state.go('onboarding.tour'); } else { $log.debug('Display disclaimer... redirecting'); $state.go('onboarding.disclaimer', { diff --git a/src/sass/views/onboarding/onboard-welcome.scss b/src/sass/views/onboarding/onboard-welcome.scss index 35d044a2e..4349af470 100644 --- a/src/sass/views/onboarding/onboard-welcome.scss +++ b/src/sass/views/onboarding/onboard-welcome.scss @@ -23,7 +23,7 @@ #logo { width: 40%; max-width: 200px; - margin: 5rem auto 0; + margin: auto 0; } #lead { line-height: 1.6; diff --git a/www/views/onboarding/tour.html b/www/views/onboarding/tour.html index 87642f4df..0067dc53e 100644 --- a/www/views/onboarding/tour.html +++ b/www/views/onboarding/tour.html @@ -1,30 +1,18 @@ - + - - - - - - - - {{'Skip' | translate}} - - - - - - You control your bitcoin. - This app stores your bitcoin with cutting-edge security. - - - Not even Bitcoin.com can access it. - - Create bitcoin wallet - - - - - + + + You control your bitcoin. + This app stores your bitcoin locally on your phone with cutting-edge security. + + + Not even Bitcoin.com can access it. + + Create bitcoin wallet + + Restore from backup + + diff --git a/www/views/onboarding/welcome.html b/www/views/onboarding/welcome.html deleted file mode 100644 index 71d60d75c..000000000 --- a/www/views/onboarding/welcome.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - Take control of your money,get started with bitcoin. - - - Get started - Restore from backup - - -
Take control of your money,get started with bitcoin.