Merge pull request #5486 from JDonadio/fix/enabled-services
Fix enabled services list
This commit is contained in:
commit
378c58d873
4 changed files with 23 additions and 9 deletions
|
|
@ -24,9 +24,6 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
|
|||
$scope.recentTransactionsEnabled = {
|
||||
value: config.recentTransactions.enabled
|
||||
};
|
||||
$scope.frequentlyUsedEnabled = {
|
||||
value: config.frequentlyUsed.enabled
|
||||
};
|
||||
};
|
||||
|
||||
$scope.spendUnconfirmedChange = function() {
|
||||
|
|
|
|||
14
src/js/controllers/buyandsellController.js
Normal file
14
src/js/controllers/buyandsellController.js
Normal 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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -866,6 +866,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
url: '/buyandsell',
|
||||
views: {
|
||||
'tab-home': {
|
||||
controller: 'buyandsellController',
|
||||
templateUrl: 'views/buyandsell.html'
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,15 +5,17 @@
|
|||
<ion-nav-title translate>Buy and sell</ion-nav-title>
|
||||
</ion-nav-bar>
|
||||
<ion-content>
|
||||
<ion-list>
|
||||
<ion-item class="item item-icon-right" ui-sref="tabs.buyandsell.coinbase">
|
||||
<div class="list">
|
||||
<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">
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</ion-item>
|
||||
<ion-item class="item item-icon-right" ui-sref="tabs.buyandsell.glidera">
|
||||
</div>
|
||||
<div class="item item-icon-right" ui-sref="tabs.buyandsell.glidera" ng-show="isGlideraEnabled">
|
||||
<img src="img/glidera-logo.png" width="90">
|
||||
<i class="icon bp-arrow-right"></i>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
</div>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue