mirror of https://github.com/BTCPrivate/copay.git
toggle contact name/address
This commit is contained in:
parent
ce15c62ced
commit
9817af964e
|
@ -14,6 +14,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
toAmount = data.stateParams.toAmount;
|
toAmount = data.stateParams.toAmount;
|
||||||
cachedSendMax = {};
|
cachedSendMax = {};
|
||||||
$scope.showFeeFiat = false;
|
$scope.showFeeFiat = false;
|
||||||
|
$scope.showAddress = false;
|
||||||
$scope.useSendMax = data.stateParams.useSendMax == 'true' ? true : false;
|
$scope.useSendMax = data.stateParams.useSendMax == 'true' ? true : false;
|
||||||
$scope.recipientType = data.stateParams.recipientType || null;
|
$scope.recipientType = data.stateParams.recipientType || null;
|
||||||
$scope.toAddress = data.stateParams.toAddress;
|
$scope.toAddress = data.stateParams.toAddress;
|
||||||
|
@ -129,6 +130,10 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
$scope.showFeeFiat = !$scope.showFeeFiat;
|
$scope.showFeeFiat = !$scope.showFeeFiat;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.toggleAddress = function() {
|
||||||
|
$scope.showAddress = !$scope.showAddress;
|
||||||
|
};
|
||||||
|
|
||||||
var initConfirm = function() {
|
var initConfirm = function() {
|
||||||
if ($scope.paypro) _paymentTimeControl($scope.paypro.expires);
|
if ($scope.paypro) _paymentTimeControl($scope.paypro.expires);
|
||||||
|
|
||||||
|
@ -152,7 +157,7 @@ angular.module('copayApp.controllers').controller('confirmController', function(
|
||||||
|
|
||||||
function resetValues() {
|
function resetValues() {
|
||||||
$scope.displayAmount = $scope.displayUnit = $scope.fee = $scope.alternativeAmountStr = $scope.insufficientFunds = $scope.noMatchingWallet = null;
|
$scope.displayAmount = $scope.displayUnit = $scope.fee = $scope.alternativeAmountStr = $scope.insufficientFunds = $scope.noMatchingWallet = null;
|
||||||
$scope.showFeeFiat = false;
|
$scope.showFeeFiat = $scope.showAddress = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.getSendMaxInfo = function() {
|
$scope.getSendMaxInfo = function() {
|
||||||
|
|
|
@ -17,4 +17,7 @@
|
||||||
.wallet-name {
|
.wallet-name {
|
||||||
margin-top: -3px;
|
margin-top: -3px;
|
||||||
}
|
}
|
||||||
|
.toggle {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,9 +55,10 @@
|
||||||
<span ng-if="toName" class="wallet-name">{{toName}}</span>
|
<span ng-if="toName" class="wallet-name">{{toName}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="recipientType == 'contact' && !isChromeApp" class="gravatar-contact">
|
<div ng-if="recipientType == 'contact' && !isChromeApp" class="gravatar-contact toggle" ng-click="toggleAddress()">
|
||||||
<gravatar class="send-gravatar" name="{{toName}}" height="30" width="30" email="{{toEmail}}"></gravatar>
|
<gravatar class="send-gravatar" name="{{toName}}" height="30" width="30" email="{{toEmail}}"></gravatar>
|
||||||
<span ng-if="toName">{{toName}}</span>
|
<span ng-if="toName && !showAddress">{{toName}}</span>
|
||||||
|
<span ng-if="toName && showAddress">{{toAddress}}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="item item-icon-right" ng-hide="!useSendMax && (insufficientFunds || noMatchingWallet)" ng-click="showWalletSelector()">
|
<a class="item item-icon-right" ng-hide="!useSendMax && (insufficientFunds || noMatchingWallet)" ng-click="showWalletSelector()">
|
||||||
|
@ -83,7 +84,7 @@
|
||||||
</span>
|
</span>
|
||||||
<i class="icon bp-arrow-right"></i>
|
<i class="icon bp-arrow-right"></i>
|
||||||
</a>
|
</a>
|
||||||
<div class="item single-line" ng-if="!insufficientFunds && !noMatchingWallet">
|
<div class="item single-line toggle" ng-if="!insufficientFunds && !noMatchingWallet">
|
||||||
<span class="label">{{'Fee' | translate}}: {{feeLevel | translate}}</span>
|
<span class="label">{{'Fee' | translate}}: {{feeLevel | translate}}</span>
|
||||||
<span ng-if="!showFeeFiat" class="item-note" ng-click="toggleFeeValue()">{{fee || '...'}}</span>
|
<span ng-if="!showFeeFiat" class="item-note" ng-click="toggleFeeValue()">{{fee || '...'}}</span>
|
||||||
<span ng-if="showFeeFiat" class="item-note" ng-click="toggleFeeValue()">{{feeFiat || '...'}}</span>
|
<span ng-if="showFeeFiat" class="item-note" ng-click="toggleFeeValue()">{{feeFiat || '...'}}</span>
|
||||||
|
|
Loading…
Reference in New Issue