removed welcome screen

This commit is contained in:
Kadir Sekha 2018-02-02 15:40:39 -04:00
commit bd2114eaea
7 changed files with 28 additions and 95 deletions

View file

@ -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');
};

View file

@ -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');
}
});

View file

@ -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);
});
};
});

View file

@ -755,15 +755,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
abstract: true,
template: '<ion-nav-view name="onboarding"></ion-nav-view>'
})
.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', {

View file

@ -23,7 +23,7 @@
#logo {
width: 40%;
max-width: 200px;
margin: 5rem auto 0;
margin: auto 0;
}
#lead {
line-height: 1.6;