removed welcome screen
This commit is contained in:
parent
c722902eab
commit
bd2114eaea
7 changed files with 28 additions and 95 deletions
|
|
@ -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');
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
});
|
||||
|
|
@ -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', {
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
#logo {
|
||||
width: 40%;
|
||||
max-width: 200px;
|
||||
margin: 5rem auto 0;
|
||||
margin: auto 0;
|
||||
}
|
||||
#lead {
|
||||
line-height: 1.6;
|
||||
|
|
|
|||
|
|
@ -1,30 +1,18 @@
|
|||
<ion-view class="onboarding" id="onboarding-tour">
|
||||
<ion-view id="onboard-welcome" class="onboarding">
|
||||
<ion-nav-bar>
|
||||
<ion-nav-title></ion-nav-title>
|
||||
<ion-nav-buttons side="primary">
|
||||
<button class="button back-button button-clear" ng-click="goBack()">
|
||||
<i class="icon ion-ios-arrow-thin-left"></i>
|
||||
</button>
|
||||
</ion-nav-buttons>
|
||||
<ion-nav-buttons side="secondary">
|
||||
<button class="button back-button button-clear" ng-show="data.index == 0" ng-click="createDefaultWallet()">
|
||||
{{'Skip' | translate}}
|
||||
</button>
|
||||
</ion-nav-buttons>
|
||||
</ion-nav-bar>
|
||||
<ion-slides class="slides" options="options" slider="data.slider">
|
||||
<ion-slide-page>
|
||||
<ion-content id="onboard-tour-control" scroll="false">
|
||||
<div class="onboarding-topic" translate>You control your bitcoin.</div>
|
||||
<div class="onboarding-description" translate>This app stores your bitcoin with cutting-edge security.</div>
|
||||
<div class="onboarding-illustration-control"></div>
|
||||
<div class="cta-buttons">
|
||||
<div class="onboarding-tldr" translate>Not even Bitcoin.com can access it.</div>
|
||||
<button class="button button-standard button-primary" ng-click="createDefaultWallet()" translate>
|
||||
Create bitcoin wallet
|
||||
</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-slide-page>
|
||||
</ion-slides>
|
||||
<ion-content id="onboard-tour-control" scroll="false" ng-init="createProfile()">
|
||||
<img src='img/app/logo-negative.png' id="logo" />
|
||||
<div class="onboarding-topic" translate>You control your bitcoin.</div>
|
||||
<div class="onboarding-description" translate>This app stores your bitcoin locally on your phone with cutting-edge security.</div>
|
||||
<div class="onboarding-illustration-control"></div>
|
||||
<div class="cta-buttons">
|
||||
<div class="onboarding-tldr" translate>Not even Bitcoin.com can access it.</div>
|
||||
<button class="button button-standard button-primary" ng-click="createDefaultWallet()" translate>
|
||||
Create bitcoin wallet
|
||||
</button>
|
||||
<button class="button button-standard button-secondary button-clear" id="restore" translate href ui-sref="onboarding.import({'fromOnboarding':true})">Restore from backup</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
<ion-view id="onboard-welcome" class="onboarding">
|
||||
<ion-content ng-controller="welcomeController" ng-init="createProfile()" scroll="false">
|
||||
<div id="logo-tagline">
|
||||
<img src='img/app/logo-negative.png' id="logo" />
|
||||
<p id="lead" translate>Take control of your money,<br />get started with bitcoin.</p>
|
||||
</div>
|
||||
<div id="cta-buttons">
|
||||
<button class="button button-standard button-primary" id="get-started" href ui-sref="onboarding.tour" translate-context="button" translate>Get started</button>
|
||||
<button class="button button-standard button-secondary button-clear" id="restore" translate href ui-sref="onboarding.import({'fromOnboarding':true})">Restore from backup</button>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
Loading…
Add table
Add a link
Reference in a new issue