move addresses view to settings

This commit is contained in:
Gabriel Bazán 2017-05-03 17:08:18 -03:00
parent 552a4c8bcf
commit e76924cb74
5 changed files with 17 additions and 9 deletions

View File

@ -130,8 +130,16 @@ angular.module('copayApp.controllers').controller('addressesController', functio
$scope.scan = function() {
walletService.startScan($scope.wallet);
$ionicHistory.nextViewOptions({
disableAnimate: true,
historyRoot: true
});
$ionicHistory.clearHistory();
$state.go('tabs.home');
$state.go('tabs.home').then(function() {
$state.transitionTo('tabs.wallet', {
walletId: $scope.wallet.credentials.walletId
});
});
};
$scope.sendByEmail = function() {

View File

@ -6,7 +6,7 @@ angular.module('copayApp.controllers').controller('preferencesAdvancedController
$scope.wallet = wallet;
$scope.goToAddresses = function() {
$state.go('tabs.receive.addresses', {
$state.go('tabs.settings.addresses', {
walletId: $stateParams.walletId,
});
};

View File

@ -13,11 +13,11 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
});
};
$scope.setAddress = function(forceNew) {
$scope.setAddress = function() {
if (!$scope.wallet || $scope.generatingAddress || !$scope.wallet.isComplete()) return;
$scope.addr = null;
$scope.generatingAddress = true;
walletService.getAddress($scope.wallet, forceNew, function(err, addr) {
walletService.getAddress($scope.wallet, false, function(err, addr) {
$scope.generatingAddress = false;
if (err) {

View File

@ -655,19 +655,19 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*
*/
.state('tabs.receive.addresses', {
.state('tabs.settings.addresses', {
url: '/addresses/:walletId/:toAddress',
views: {
'tab-receive@tabs': {
'tab-settings@tabs': {
controller: 'addressesController',
templateUrl: 'views/addresses.html'
}
}
})
.state('tabs.receive.allAddresses', {
.state('tabs.settings.allAddresses', {
url: '/allAddresses/:walletId',
views: {
'tab-receive@tabs': {
'tab-settings@tabs': {
controller: 'addressesController',
templateUrl: 'views/allAddresses.html'
}

View File

@ -1,4 +1,4 @@
<ion-view hide-tabs id="addresses" class="addr">
<ion-view id="addresses" class="addr">
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Wallet Addresses' | translate}}</ion-nav-title>
<ion-nav-back-button>