update slide text button
This commit is contained in:
parent
dafd46c3a2
commit
96c1c1a293
5 changed files with 65 additions and 35 deletions
|
|
@ -19,15 +19,37 @@ angular.module('copayApp.controllers').controller('txpDetailsController', functi
|
|||
$scope.displayUnit = getDisplayUnit($scope.tx.amountStr);
|
||||
initActionList();
|
||||
checkPaypro();
|
||||
}
|
||||
applyButtonText();
|
||||
};
|
||||
|
||||
function applyButtonText(multisig) {
|
||||
$scope.buttonText = $scope.isCordova ? gettextCatalog.getString('Slide') + ' ' : gettextCatalog.getString('Click') + ' ';
|
||||
|
||||
if ($scope.paypro) {
|
||||
$scope.buttonText += gettextCatalog.getString('to pay');
|
||||
return;
|
||||
}
|
||||
|
||||
if ($scope.isGlidera || $scope.isGiftCard || $scope.cardId) {
|
||||
$scope.buttonText += gettextCatalog.getString('to complete');
|
||||
return;
|
||||
}
|
||||
|
||||
if (multisig) {
|
||||
$scope.buttonText += gettextCatalog.getString('to accept');
|
||||
return;
|
||||
}
|
||||
|
||||
$scope.buttonText += gettextCatalog.getString('to send');
|
||||
};
|
||||
|
||||
function getDisplayAmount(amountStr) {
|
||||
return amountStr.split(' ')[0];
|
||||
}
|
||||
};
|
||||
|
||||
function getDisplayUnit(amountStr) {
|
||||
return amountStr.split(' ')[1];
|
||||
}
|
||||
};
|
||||
|
||||
function initActionList() {
|
||||
$scope.actionList = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue