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,7 @@
<div> <div>
<h1 translate>Screenshots are not secure</h1> <h1 translate>Screenshots are not secure</h1>
<span translate>if you take a screenshot, your backup may be viewed by others apps. You can make a safe backup with paper and a pen.</span> <span translate>if you take a screenshot, your backup may be viewed by others apps. You can make a safe backup with paper and a pen.</span>
<button ng-click="close()" class="button button-block button-light" translate> <button ng-click="close()" class="button button-block no-border" translate>
Got it Got it
</button> </button>
</div> </div>

View file

@ -17,7 +17,8 @@
<i class="ion-ios-arrow-thin-down light-blue col col-60" id="arrow-down"></i> <i class="ion-ios-arrow-thin-down light-blue col col-60" id="arrow-down"></i>
</div> </div>
<div class="row"> <div class="row">
<button class="button button-block button-positive col-75 col" href ui-sref="onboarding.backupWarning" translate>Backup wallet</button> <button class="button button-block button-positive col-75 col" href
ui-sref="onboarding.backupWarning({walletId: walletId})" translate>Backup wallet</button>
</div> </div>
<div class="row"> <div class="row">
<button class="button button-block button-transparent col-75 col" ng-click="openPopup()" translate>I'll backup my wallet later</button> <button class="button button-block button-transparent col-75 col" ng-click="openPopup()" translate>I'll backup my wallet later</button>

View file

@ -1,12 +1,12 @@
<ion-view id="onboarding-backup-warning" class="onboarding"> <ion-view id="onboarding-backup-warning" class="onboarding" ng-controller="backupWarningController">
<ion-nav-bar class="bar-stable"> <ion-nav-bar>
<ion-nav-buttons side="primary"> <ion-nav-buttons side="primary">
<button class="button no-border" href ui-sref="onboarding.backupRequest"> <button class="button button-back no-border" href ui-sref="onboarding.backupRequest({walletId: walletId})">
<i class="icon ion-ios-arrow-thin-left"></i> <i class="icon ion-ios-arrow-thin-left"></i>
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>
</ion-nav-bar> </ion-nav-bar>
<ion-content ng-controller="backupWarningController"> <ion-content>
<div class="row text-center"> <div class="row text-center">
<h3 translate class="col col-75"> <h3 translate class="col col-75">
Are you being watched? Are you being watched?

View file

@ -1,11 +1,4 @@
<ion-view ng-controller="collectEmailController" id="onboarding-collect-email" class="onboarding"> <ion-view ng-controller="collectEmailController" id="onboarding-collect-email" class="onboarding">
<ion-nav-bar class="bar-stable">
<ion-nav-buttons side="secondary">
<button class="button no-border" ng-click="onboardingMailSkip()">
{{'Skip' | translate}}
</button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-content> <ion-content>
<div class="row"> <div class="row">
<img src="img/onboarding-success.svg" class="col col-75" id="success-image" /> <img src="img/onboarding-success.svg" class="col col-75" id="success-image" />
@ -24,6 +17,11 @@
<input type="email" id="email" name="email" ng-model="email" required></input> <input type="email" id="email" name="email" ng-model="email" required></input>
</label> </label>
</form> </form>
<div class="text-center">
<button class="button button-back no-border" ng-click="onboardingMailSkip()">
{{'Skip' | translate}}
</button>
</div>
</div> </div>
<div class="overlay"></div> <div class="overlay"></div>
</ion-view> </ion-view>

View file

@ -10,7 +10,7 @@
</span> </span>
<button class="button button-block button-positive" ng-click="allowNotif()" translate>Allow notifications</button> <button class="button button-block button-positive" ng-click="allowNotif()" translate>Allow notifications</button>
<button class="button button-block button-light" href ui-sref="onboarding.backupRequest" translate>Not now</button> <button class="button button-block button-light" href ui-sref="onboarding.backupRequest({walletId: walletId})" translate>Not now</button>
</div> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>

View file

@ -1,7 +1,8 @@
'use strict'; '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() { $scope.openPopup = function() {
var backupLaterPopup = $ionicPopup.show({ var backupLaterPopup = $ionicPopup.show({
templateUrl: "views/includes/backupLaterPopup.html", templateUrl: "views/includes/backupLaterPopup.html",

View file

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

View file

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

View file

@ -1,7 +1,9 @@
'use strict'; '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() { $scope.allowNotif = function() {
profileService.pushNotificationsInit(); profileService.pushNotificationsInit();
$state.go('onboarding.backupRequest'); $state.go('onboarding.backupRequest');

View file

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

View file

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

View file

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