add home tip when onboarding is finished

This commit is contained in:
Gabriel Bazán 2016-09-19 12:06:46 -03:00
commit c2c70779fa
8 changed files with 72 additions and 26 deletions

View file

@ -5,6 +5,22 @@
<ion-content class="padding" ng-controller="tabHomeController" ng-init="updateAllWallets(); nextStep()">
<div class="list card homeTip" ng-show="homeTip">
<div class="item item-icon-right item-heading">
<a ng-click="homeTip = false"><i class="icon ion-ios-close-empty close-home-tip"></i></a>
</div>
<div class="icon">
<i class="icon big-icon-svg">
<img src="img/icon-wallet.svg" class="bg"/>
</i>
</div>
<div class="title" translate>
Your bitcoin wallet is ready!
</div>
<div class="subtitle" translate>
On this screen you can see all your wallets, accounts, and assets.
</div>
</div>
<div class="list card" ng-hide="!txps[0]">
<a class="item item-icon-right item-heading" ui-sref="tabs.proposals" translate>

View file

@ -345,6 +345,8 @@ angular.module('copayApp.controllers').controller('importController',
if (err) $log.error(err);
});
}
$state.go('tabs.home');
$state.go('tabs.home', {
fromOnboarding: $stateParams.fromOnboarding
});
};
});

View file

@ -15,7 +15,9 @@ angular.module('copayApp.controllers').controller('disclaimerController', functi
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
else {
$state.go('tabs.home');
$state.go('tabs.home', {
fromOnboarding: true
});
}
});
};

View file

@ -8,7 +8,9 @@ angular.module('copayApp.controllers').controller('termsController', function($s
profileService.setDisclaimerAccepted(function(err) {
if (err) $log.error(err);
else {
$state.go('tabs.home');
$state.go('tabs.home', {
fromOnboarding: true
});
}
});
};

View file

@ -1,13 +1,13 @@
'use strict';
angular.module('copayApp.controllers').controller('tabHomeController',
function($rootScope, $timeout, $scope, $state, $ionicScrollDelegate, lodash, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window) {
function($rootScope, $timeout, $scope, $state, $stateParams, $ionicScrollDelegate, lodash, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window) {
$scope.externalServices = {};
$scope.bitpayCardEnabled = true; // TODO
$scope.openTxpModal = txpModalService.open;
$scope.version = $window.version;
$scope.name = $window.appConfig.nameCase;
$scope.homeTip = $stateParams.fromOnboarding;
configService.whenAvailable(function() {
var config = configService.getSync();
var isWindowsPhoneApp = platformInfo.isWP && platformInfo.isCordova;

View file

@ -186,7 +186,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
templateUrl: 'views/tabs.html'
})
.state('tabs.home', {
url: '/home',
url: '/home/:fromOnboarding',
views: {
'tab-home': {
templateUrl: 'views/tab-home.html',
@ -632,29 +632,29 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
})
/*
*
* Buy or Sell Bitcoin
*
*/
/*
*
* Buy or Sell Bitcoin
*
*/
.state('tabs.buyandsell', {
url: '/buyandsell',
views: {
'tab-home': {
templateUrl: 'views/buyandsell.html'
}
.state('tabs.buyandsell', {
url: '/buyandsell',
views: {
'tab-home': {
templateUrl: 'views/buyandsell.html'
}
})
}
})
/*
*
* Glidera
*
*
*/
/*
*
* Glidera
*
*
*/
.state('tabs.buyandsell.glidera', {
.state('tabs.buyandsell.glidera', {
url: '/glidera',
views: {
'tab-home@tabs': {

View file

@ -12,6 +12,11 @@
font-weight: lighter;
}
.icon.close-home-tip {
color: #666;
font-size: 38px;
}
.icon.list-add-button {
color: #666;
font-size: 38px;

View file

@ -20,5 +20,24 @@
padding-top: 20px;
padding-bottom: 20px;
}
.homeTip {
.item {
border-style: none;
}
div {
text-align: center;
margin-top: 20px;
margin-bottom: 20px;
}
.title {
font-size: 20px;
font-weight: bold;
}
.subtitle{
margin-left: 25px;
margin-right: 25px;
font-size: 18px;
font-weight: 100;
}
}
}