Merge pull request #5486 from JDonadio/fix/enabled-services

Fix enabled services list
This commit is contained in:
Gustavo Maximiliano Cortez 2017-01-23 10:45:45 -03:00 committed by GitHub
commit 378c58d873
4 changed files with 23 additions and 9 deletions

View file

@ -24,9 +24,6 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
$scope.recentTransactionsEnabled = { $scope.recentTransactionsEnabled = {
value: config.recentTransactions.enabled value: config.recentTransactions.enabled
}; };
$scope.frequentlyUsedEnabled = {
value: config.frequentlyUsed.enabled
};
}; };
$scope.spendUnconfirmedChange = function() { $scope.spendUnconfirmedChange = function() {

View file

@ -0,0 +1,14 @@
'use strict';
angular.module('copayApp.controllers').controller('buyandsellController', function($scope, $ionicHistory, configService) {
$scope.$on("$ionicView.beforeEnter", function(event, data) {
configService.whenAvailable(function(config) {
$scope.isCoinbaseEnabled = config.coinbase.enabled;
$scope.isGlideraEnabled = config.glidera.enabled;
if (!$scope.isCoinbaseEnabled && !$scope.isGlideraEnabled)
$ionicHistory.goBack();
});
});
});

View file

@ -866,6 +866,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
url: '/buyandsell', url: '/buyandsell',
views: { views: {
'tab-home': { 'tab-home': {
controller: 'buyandsellController',
templateUrl: 'views/buyandsell.html' templateUrl: 'views/buyandsell.html'
} }
} }

View file

@ -5,15 +5,17 @@
<ion-nav-title translate>Buy and sell</ion-nav-title> <ion-nav-title translate>Buy and sell</ion-nav-title>
</ion-nav-bar> </ion-nav-bar>
<ion-content> <ion-content>
<ion-list> <div class="list">
<ion-item class="item item-icon-right" ui-sref="tabs.buyandsell.coinbase"> <div class="item item-divider"></div>
<div class="item item-icon-right" ui-sref="tabs.buyandsell.coinbase" ng-show="isCoinbaseEnabled">
<img src="img/coinbase-logo.png" width="90"> <img src="img/coinbase-logo.png" width="90">
<i class="icon bp-arrow-right"></i> <i class="icon bp-arrow-right"></i>
</ion-item> </div>
<ion-item class="item item-icon-right" ui-sref="tabs.buyandsell.glidera"> <div class="item item-icon-right" ui-sref="tabs.buyandsell.glidera" ng-show="isGlideraEnabled">
<img src="img/glidera-logo.png" width="90"> <img src="img/glidera-logo.png" width="90">
<i class="icon bp-arrow-right"></i> <i class="icon bp-arrow-right"></i>
</ion-item> </div>
</ion-list> </div>
</ion-content> </ion-content>
</ion-view> </ion-view>