Remove html from popup messages. Refresh view after card or account removal. Remove old code in tab-settings ctrl.
This commit is contained in:
parent
bb744f1e05
commit
efd92f5d4a
3 changed files with 11 additions and 18 deletions
|
|
@ -5,7 +5,7 @@ angular.module('copayApp.controllers').controller('preferencesBitpayServicesCont
|
|||
|
||||
$scope.removeAccount = function(account) {
|
||||
var title = gettextCatalog.getString('Remove BitPay Account?');
|
||||
var msg = gettextCatalog.getString('Removing your BitPay account will remove all associated BitPay account data from this device.<br/><br/>Are you sure you would like to remove your BitPay Account ({{email}}) from this device?', {
|
||||
var msg = gettextCatalog.getString('Removing your BitPay account will remove all associated BitPay account data from this device. Are you sure you would like to remove your BitPay Account ({{email}}) from this device?', {
|
||||
email: account.email
|
||||
});
|
||||
popupService.showConfirm(title, msg, null, null, function(res) {
|
||||
|
|
@ -64,6 +64,9 @@ angular.module('copayApp.controllers').controller('preferencesBitpayServicesCont
|
|||
if (cb) {
|
||||
cb();
|
||||
}
|
||||
$timeout(function(){
|
||||
$rootScope.$apply();
|
||||
}, 10);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -16,27 +16,17 @@ angular.module('copayApp.controllers').controller('tabSettingsController', funct
|
|||
isoCode: config.wallet.settings.alternativeIsoCode
|
||||
};
|
||||
|
||||
$scope.bitpayCardEnabled = config.bitpayCard.enabled;
|
||||
$scope.glideraEnabled = config.glidera.enabled && !isWindowsPhoneApp;
|
||||
|
||||
// TODO move this to a generic service
|
||||
bitpayAccountService.getAccounts(function(err, data) {
|
||||
if (err) $log.error(err);
|
||||
$scope.bitpayAccounts = !lodash.isEmpty(data);
|
||||
});
|
||||
|
||||
if ($scope.bitpayCardEnabled) {
|
||||
bitpayCardService.getCards(function(err, cards) {
|
||||
if (err) $log.error(err);
|
||||
$scope.bitpayCards = cards && cards.length > 0;
|
||||
});
|
||||
}
|
||||
|
||||
if ($scope.glideraEnabled) {
|
||||
storageService.getGlideraToken(glideraService.getEnvironment(), function(err, token) {
|
||||
if (err) $log.error(err);
|
||||
$scope.glideraToken = token;
|
||||
});
|
||||
}
|
||||
// TODO move this to a generic service
|
||||
bitpayCardService.getCards(function(err, cards) {
|
||||
if (err) $log.error(err);
|
||||
$scope.bitpayCards = cards && cards.length > 0;
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue