hide next steps
This commit is contained in:
parent
44cf9dc971
commit
34bc2ba209
5 changed files with 23 additions and 84 deletions
|
|
@ -3,27 +3,18 @@
|
||||||
angular.module('copayApp.controllers').controller('advancedSettingsController', function($scope, $rootScope, $log, $window, lodash, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService, storageService, $ionicHistory, $timeout, $ionicScrollDelegate) {
|
angular.module('copayApp.controllers').controller('advancedSettingsController', function($scope, $rootScope, $log, $window, lodash, configService, uxLanguage, platformInfo, pushNotificationsService, profileService, feeService, storageService, $ionicHistory, $timeout, $ionicScrollDelegate) {
|
||||||
|
|
||||||
var updateConfig = function() {
|
var updateConfig = function() {
|
||||||
|
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
|
|
||||||
$scope.spendUnconfirmed = {
|
$scope.spendUnconfirmed = {
|
||||||
value: config.wallet.spendUnconfirmed
|
value: config.wallet.spendUnconfirmed
|
||||||
};
|
};
|
||||||
$scope.bitpayCardEnabled = {
|
|
||||||
value: config.bitpayCard.enabled
|
|
||||||
};
|
|
||||||
$scope.amazonEnabled = {
|
|
||||||
value: config.amazon.enabled
|
|
||||||
};
|
|
||||||
$scope.glideraEnabled = {
|
|
||||||
value: config.glidera.enabled
|
|
||||||
};
|
|
||||||
$scope.coinbaseEnabled = {
|
|
||||||
value: config.coinbaseV2
|
|
||||||
};
|
|
||||||
$scope.recentTransactionsEnabled = {
|
$scope.recentTransactionsEnabled = {
|
||||||
value: config.recentTransactions.enabled
|
value: config.recentTransactions.enabled
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.hideNextSteps = {
|
||||||
|
value: config.hideNextSteps.enabled
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.spendUnconfirmedChange = function() {
|
$scope.spendUnconfirmedChange = function() {
|
||||||
|
|
@ -37,42 +28,11 @@ angular.module('copayApp.controllers').controller('advancedSettingsController',
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.bitpayCardChange = function() {
|
$scope.nextStepsChange = function() {
|
||||||
var opts = {
|
var opts = {
|
||||||
bitpayCard: {
|
hideNextSteps: {
|
||||||
enabled: $scope.bitpayCardEnabled.value
|
enabled: $scope.hideNextSteps.value
|
||||||
}
|
},
|
||||||
};
|
|
||||||
configService.set(opts, function(err) {
|
|
||||||
if (err) $log.debug(err);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.amazonChange = function() {
|
|
||||||
var opts = {
|
|
||||||
amazon: {
|
|
||||||
enabled: $scope.amazonEnabled.value
|
|
||||||
}
|
|
||||||
};
|
|
||||||
configService.set(opts, function(err) {
|
|
||||||
if (err) $log.debug(err);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.glideraChange = function() {
|
|
||||||
var opts = {
|
|
||||||
glidera: {
|
|
||||||
enabled: $scope.glideraEnabled.value
|
|
||||||
}
|
|
||||||
};
|
|
||||||
configService.set(opts, function(err) {
|
|
||||||
if (err) $log.debug(err);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
$scope.coinbaseChange = function() {
|
|
||||||
var opts = {
|
|
||||||
coinbaseV2: $scope.coinbaseEnabled.value
|
|
||||||
};
|
};
|
||||||
configService.set(opts, function(err) {
|
configService.set(opts, function(err) {
|
||||||
if (err) $log.debug(err);
|
if (err) $log.debug(err);
|
||||||
|
|
|
||||||
|
|
@ -94,7 +94,6 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
$scope.nextStepsItems = nextStepsService.get();
|
|
||||||
$scope.buyAndSellItems = buyAndSellService.getLinked();
|
$scope.buyAndSellItems = buyAndSellService.getLinked();
|
||||||
$scope.homeIntegrations = homeIntegrationsService.get();
|
$scope.homeIntegrations = homeIntegrationsService.get();
|
||||||
|
|
||||||
|
|
@ -107,7 +106,10 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
$scope.recentTransactionsEnabled = config.recentTransactions.enabled;
|
$scope.recentTransactionsEnabled = config.recentTransactions.enabled;
|
||||||
if ($scope.recentTransactionsEnabled) getNotifications();
|
if ($scope.recentTransactionsEnabled) getNotifications();
|
||||||
|
|
||||||
if ($scope.bitpayCardEnabled) bitpayCardCache();
|
if (!config.hideNextSteps.enabled) {
|
||||||
|
$scope.nextStepsItems = nextStepsService.get();
|
||||||
|
}
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$ionicScrollDelegate.resize();
|
$ionicScrollDelegate.resize();
|
||||||
$scope.$apply();
|
$scope.$apply();
|
||||||
|
|
|
||||||
|
|
@ -43,26 +43,14 @@ angular.module('copayApp.services').factory('configService', function(storageSer
|
||||||
},
|
},
|
||||||
|
|
||||||
// External services
|
// External services
|
||||||
glidera: {
|
|
||||||
enabled: true,
|
|
||||||
testnet: false
|
|
||||||
},
|
|
||||||
|
|
||||||
coinbaseV2: true,
|
|
||||||
|
|
||||||
bitpayCard: {
|
|
||||||
enabled: true
|
|
||||||
},
|
|
||||||
|
|
||||||
amazon: {
|
|
||||||
enabled: true
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
recentTransactions: {
|
recentTransactions: {
|
||||||
enabled: true,
|
enabled: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
hideNextSteps: {
|
||||||
|
enabled: false,
|
||||||
|
},
|
||||||
|
|
||||||
rates: {
|
rates: {
|
||||||
url: 'https://insight.bitpay.com:443/api/rates',
|
url: 'https://insight.bitpay.com:443/api/rates',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -7,24 +7,6 @@
|
||||||
|
|
||||||
<ion-content>
|
<ion-content>
|
||||||
<div class="settings-list list">
|
<div class="settings-list list">
|
||||||
<div class="item item-divider" translate>Enabled Integrations</div>
|
|
||||||
|
|
||||||
<ion-toggle ng-show="!isWP" ng-model="bitpayCardEnabled.value" toggle-class="toggle-balanced" ng-change="bitpayCardChange()">
|
|
||||||
<span class="toggle-label" translate>Enable BitPay Card Integration</span>
|
|
||||||
</ion-toggle>
|
|
||||||
|
|
||||||
<ion-toggle ng-show="!isWP" ng-model="amazonEnabled.value" toggle-class="toggle-balanced" ng-change="amazonChange()">
|
|
||||||
<span class="toggle-label" translate>Enable Amazon Integration</span>
|
|
||||||
</ion-toggle>
|
|
||||||
|
|
||||||
<ion-toggle ng-show="!isWP" ng-model="glideraEnabled.value" toggle-class="toggle-balanced" ng-change="glideraChange()">
|
|
||||||
<span class="toggle-label" translate>Enable Glidera Service</span>
|
|
||||||
</ion-toggle>
|
|
||||||
|
|
||||||
<ion-toggle ng-show="!isWP" ng-model="coinbaseEnabled.value" toggle-class="toggle-balanced" ng-change="coinbaseChange()">
|
|
||||||
<span class="toggle-label" translate>Enable Coinbase Service</span>
|
|
||||||
</ion-toggle>
|
|
||||||
|
|
||||||
<div class="item item-divider" translate>Wallet Operation</div>
|
<div class="item item-divider" translate>Wallet Operation</div>
|
||||||
|
|
||||||
<ion-toggle class="has-comment" ng-model="spendUnconfirmed.value" toggle-class="toggle-balanced" ng-change="spendUnconfirmedChange()">
|
<ion-toggle class="has-comment" ng-model="spendUnconfirmed.value" toggle-class="toggle-balanced" ng-change="spendUnconfirmedChange()">
|
||||||
|
|
@ -41,6 +23,13 @@
|
||||||
If enabled, the Recent Transactions card - a list of transactions occuring across all wallets - will appear in the Home tab.
|
If enabled, the Recent Transactions card - a list of transactions occuring across all wallets - will appear in the Home tab.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<ion-toggle ng-model="hideNextSteps.value" toggle-class="toggle-balanced" ng-change="nextStepsChange()">
|
||||||
|
<span class="toggle-label" translate>Hide Next Steps Card</span>
|
||||||
|
</ion-toggle>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
</ion-view>
|
</ion-view>
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
Incomplete
|
Incomplete
|
||||||
</span>
|
</span>
|
||||||
<span ng-if="wallet.isComplete()">
|
<span ng-if="wallet.isComplete()">
|
||||||
<span ng-if="!wallet.balanceHidden"> {{wallet.status.totalBalanceStr ? wallet.status.totalBalanceStr : ( wallet.cachedBalance ? wallet.cachedBalance + ' | ' + (wallet.cachedBalanceUpdatedOn ? ( wallet.cachedBalanceUpdatedOn * 1000 | amTimeAgo) : '') : '' ) }} </span>
|
<span ng-if="!wallet.balanceHidden"> {{wallet.status.totalBalanceStr ? wallet.status.totalBalanceStr : ( wallet.cachedBalance ? wallet.cachedBalance + (wallet.cachedBalanceUpdatedOn ? ' | ' + ( wallet.cachedBalanceUpdatedOn * 1000 | amTimeAgo) : '') : '' ) }} </span>
|
||||||
|
|
||||||
<span ng-if="wallet.balanceHidden" translate>[Balance Hidden]</span>
|
<span ng-if="wallet.balanceHidden" translate>[Balance Hidden]</span>
|
||||||
<span class="tab-home__wallet__multisig-number" ng-if="wallet.n > 1">
|
<span class="tab-home__wallet__multisig-number" ng-if="wallet.n > 1">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue