Merge pull request #5091 from cmgustavo/ref/move-bitpaycard-preferences
Moves bitpayCard pref to tab-settings
This commit is contained in:
commit
1669cedd6a
5 changed files with 26 additions and 9 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('tabSettingsController', function($scope, $window, $ionicModal, uxLanguage, platformInfo, profileService, feeService, configService, externalLinkService) {
|
angular.module('copayApp.controllers').controller('tabSettingsController', function($scope, $window, $ionicModal, lodash, uxLanguage, platformInfo, profileService, feeService, configService, externalLinkService, bitpayCardService) {
|
||||||
|
|
||||||
var updateConfig = function() {
|
var updateConfig = function() {
|
||||||
|
|
||||||
|
|
@ -23,6 +23,8 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
||||||
$scope.currentFeeLevel = feeService.getCurrentFeeLevel();
|
$scope.currentFeeLevel = feeService.getCurrentFeeLevel();
|
||||||
|
|
||||||
$scope.wallets = profileService.getWallets();
|
$scope.wallets = profileService.getWallets();
|
||||||
|
|
||||||
|
$scope.bitpayCardEnabled = config.bitpayCard.enabled;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) {
|
$scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) {
|
||||||
|
|
@ -31,6 +33,12 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
||||||
|
|
||||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
updateConfig();
|
updateConfig();
|
||||||
|
|
||||||
|
bitpayCardService.getBitpayDebitCards(function(err, data) {
|
||||||
|
if (!lodash.isEmpty(data)) {
|
||||||
|
$scope.bitpayCards = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -993,10 +993,10 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
paypro: null
|
paypro: null
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.state('tabs.bitpayCard.preferences', {
|
.state('tabs.preferences.bitpayCard', {
|
||||||
url: '/preferences',
|
url: '/bitpay-card',
|
||||||
views: {
|
views: {
|
||||||
'tab-home@tabs': {
|
'tab-settings@tabs': {
|
||||||
controller: 'preferencesBitpayCardController',
|
controller: 'preferencesBitpayCardController',
|
||||||
templateUrl: 'views/preferencesBitpayCard.html'
|
templateUrl: 'views/preferencesBitpayCard.html'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
.settings {
|
.settings {
|
||||||
@extend .deflash-blue;
|
@extend .deflash-blue;
|
||||||
|
.icon-bitpay-card {
|
||||||
|
background-image: url("../img/icon-card.svg");
|
||||||
|
background-color: #1e3186;
|
||||||
|
}
|
||||||
.item {
|
.item {
|
||||||
color: $dark-gray;
|
color: $dark-gray;
|
||||||
border-color: rgba(221, 221, 221, 0.3);
|
border-color: rgba(221, 221, 221, 0.3);
|
||||||
|
|
|
||||||
|
|
@ -3,11 +3,6 @@
|
||||||
<ion-nav-back-button>
|
<ion-nav-back-button>
|
||||||
</ion-nav-back-button>
|
</ion-nav-back-button>
|
||||||
<ion-nav-title>BitPay Visa<sup>®</sup> Card ({{card.lastFourDigits}})</ion-nav-title>
|
<ion-nav-title>BitPay Visa<sup>®</sup> Card ({{card.lastFourDigits}})</ion-nav-title>
|
||||||
<ion-nav-buttons side="secondary">
|
|
||||||
<button class="button no-border" ui-sref="tabs.bitpayCard.preferences">
|
|
||||||
<i class="icon ion-ios-settings"></i>
|
|
||||||
</button>
|
|
||||||
</ion-nav-buttons>
|
|
||||||
</ion-nav-bar>
|
</ion-nav-bar>
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
|
|
|
||||||
|
|
@ -118,6 +118,16 @@
|
||||||
<i class="icon bp-arrow-right"></i>
|
<i class="icon bp-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
<a class=" item item-icon-left item-icon-right"
|
||||||
|
ng-if="bitpayCardEnabled && bitpayCards"
|
||||||
|
ui-sref="tabs.preferences.bitpayCard">
|
||||||
|
<i class="icon big-icon-svg circle">
|
||||||
|
<div class="bg icon-bitpay-card"></div>
|
||||||
|
</i>
|
||||||
|
<span>BitPay Visa® Card</span>
|
||||||
|
<i class="icon bp-arrow-right"></i>
|
||||||
|
</a>
|
||||||
|
|
||||||
<div class="item item-divider"></div>
|
<div class="item item-divider"></div>
|
||||||
|
|
||||||
<a class="ng-hide item item-icon-left item-icon-right" href ng-hide="true">
|
<a class="ng-hide item item-icon-left item-icon-right" href ng-hide="true">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue