openWalletSettings-function + refactor of addresses-route.. Removed unused paths.
This commit is contained in:
parent
9b7827236c
commit
3f359f033e
5 changed files with 21 additions and 48 deletions
|
|
@ -158,14 +158,7 @@ angular.module('copayApp.controllers').controller('addressesController', functio
|
|||
};
|
||||
|
||||
$scope.viewAllAddresses = function() {
|
||||
var fromView = $ionicHistory.currentStateName();
|
||||
var path;
|
||||
if (fromView.indexOf('settings') !== -1) {
|
||||
path = 'tabs.settings.allAddresses';
|
||||
} else {
|
||||
path = 'tabs.wallet.allAddresses';
|
||||
}
|
||||
$state.go(path, {
|
||||
$state.go('tabs.wallet.allAddresses', {
|
||||
walletId: $scope.wallet.id
|
||||
});
|
||||
};
|
||||
|
|
@ -209,7 +202,7 @@ angular.module('copayApp.controllers').controller('addressesController', functio
|
|||
return '';
|
||||
}
|
||||
return dateObj.toJSON();
|
||||
};
|
||||
}
|
||||
|
||||
ongoingProcess.set('sendingByEmail', true);
|
||||
$timeout(function() {
|
||||
|
|
@ -240,7 +233,7 @@ angular.module('copayApp.controllers').controller('addressesController', functio
|
|||
};
|
||||
|
||||
$scope.$on("$ionicView.afterEnter", function(event, data) {
|
||||
$scope.allAddressesView = data.stateName == 'tabs.receive.allAddresses' ? true : false;
|
||||
$scope.allAddressesView = data.stateName === 'tabs.wallet.allAddresses';
|
||||
if (!isCachedWallet($stateParams.walletId)) $scope.init();
|
||||
else $log.debug('Addresses cached for Wallet:', $stateParams.walletId);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ angular.module('copayApp.controllers').controller('preferencesAdvancedController
|
|||
$scope.wallet = wallet;
|
||||
|
||||
$scope.goToAddresses = function() {
|
||||
$state.go('tabs.settings.addresses', {
|
||||
$state.go('tabs.preferences.addresses', {
|
||||
walletId: $stateParams.walletId,
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
updatingTxHistory: false,
|
||||
fetchedAllTxHistory: false,
|
||||
//updateTxHistoryError: false
|
||||
updateTxHistoryFailed: false
|
||||
updateTxHistoryFailed: false,
|
||||
|
||||
openWalletSettings: openWalletSettings
|
||||
};
|
||||
|
||||
// Need flag for when to allow infinite scroll at bottom
|
||||
|
|
@ -115,6 +117,10 @@ angular.module('copayApp.controllers').controller('walletDetailsController', fun
|
|||
});
|
||||
};
|
||||
|
||||
function openWalletSettings() {
|
||||
$state.go('tabs.preferences', {'walletId': $scope.wallet.id, 'backToDetails': true});
|
||||
}
|
||||
|
||||
$scope.openSearchModal = function() {
|
||||
$scope.color = $scope.wallet.color;
|
||||
$scope.isSearching = true;
|
||||
|
|
|
|||
|
|
@ -194,16 +194,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
}
|
||||
})
|
||||
|
||||
.state('tabs.wallet.addresses', {
|
||||
url: '/addresses/:walletId/:toAddress',
|
||||
views: {
|
||||
'tab-home@tabs': {
|
||||
controller: 'addressesController',
|
||||
templateUrl: 'views/addresses.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.wallet.allAddresses', {
|
||||
url: '/allAddresses/:walletId',
|
||||
views: {
|
||||
|
|
@ -588,6 +578,15 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.preferences.addresses', { /* Addresses */
|
||||
url: '/addresses/:walletId/:toAddress',
|
||||
views: {
|
||||
'tab-home@tabs': {
|
||||
controller: 'addressesController',
|
||||
templateUrl: 'views/addresses.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.preferences.export', {
|
||||
url: '/export',
|
||||
views: {
|
||||
|
|
@ -694,31 +693,6 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
}
|
||||
})
|
||||
|
||||
/*
|
||||
*
|
||||
* Addresses
|
||||
*
|
||||
*/
|
||||
|
||||
.state('tabs.settings.addresses', {
|
||||
url: '/addresses/:walletId/:toAddress',
|
||||
views: {
|
||||
'tab-settings@tabs': {
|
||||
controller: 'addressesController',
|
||||
templateUrl: 'views/addresses.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
.state('tabs.settings.allAddresses', {
|
||||
url: '/allAddresses/:walletId',
|
||||
views: {
|
||||
'tab-settings@tabs': {
|
||||
controller: 'addressesController',
|
||||
templateUrl: 'views/allAddresses.html'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
/*
|
||||
*
|
||||
* Request Specific amount
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<button class="button back-button" ng-click="startSearch(); openSearchModal()" ng-if="txHistory.length > 4">
|
||||
<i class="icon ion-ios-search-strong tx-search"></i>
|
||||
</button>
|
||||
<button class="button" ng-click="openWalletSettings();">
|
||||
<button class="button" ng-click="vm.openWalletSettings();">
|
||||
<i class="icon ion-android-settings"></i>
|
||||
</button>
|
||||
</ion-nav-buttons>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue