mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #3160 from cmgustavo/feat/share-customized-amount
Adds share button for customized amounts
This commit is contained in:
commit
8dd8649ce3
|
@ -17,6 +17,13 @@
|
||||||
<ul class="no-bullet size-14 m0">
|
<ul class="no-bullet size-14 m0">
|
||||||
<li class="line-b p10 oh text-center">
|
<li class="line-b p10 oh text-center">
|
||||||
<qrcode size="220" data="bitcoin:{{addr + '?amount=' + customizedAmountBtc}}"></qrcode>
|
<qrcode size="220" data="bitcoin:{{addr + '?amount=' + customizedAmountBtc}}"></qrcode>
|
||||||
|
<div class="m10t text-center" ng-show="isCordova">
|
||||||
|
<span class="button outline dark-gray tiny round"
|
||||||
|
ng-click="shareAddress('bitcoin:' + addr + '?amount=' + customizedAmountBtc)">
|
||||||
|
<i class="fi-share"></i>
|
||||||
|
<span translate>Share address</span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<h4 class="title m0" translate>Details</h4>
|
<h4 class="title m0" translate>Details</h4>
|
||||||
|
|
|
@ -462,6 +462,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
$scope.unitDecimals = self.unitDecimals;
|
$scope.unitDecimals = self.unitDecimals;
|
||||||
var satToUnit = 1 / self.unitToSatoshi;
|
var satToUnit = 1 / self.unitToSatoshi;
|
||||||
$scope.showAlternative = false;
|
$scope.showAlternative = false;
|
||||||
|
$scope.isCordova = isCordova;
|
||||||
|
|
||||||
Object.defineProperty($scope,
|
Object.defineProperty($scope,
|
||||||
"_customAlternative", {
|
"_customAlternative", {
|
||||||
|
@ -516,6 +517,15 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
$scope.showAlternative = !$scope.showAlternative;
|
$scope.showAlternative = !$scope.showAlternative;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
$scope.shareAddress = function(uri) {
|
||||||
|
if (isCordova) {
|
||||||
|
if (isMobile.Android() || isMobile.Windows()) {
|
||||||
|
window.ignoreMobilePause = true;
|
||||||
|
}
|
||||||
|
window.plugins.socialsharing.share(uri, null, null, null);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
$scope.cancel = function() {
|
$scope.cancel = function() {
|
||||||
$modalInstance.dismiss('cancel');
|
$modalInstance.dismiss('cancel');
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue