mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #2356 from cmgustavo/feature/share-address
Share address button for mobile
This commit is contained in:
commit
5479451aac
|
@ -109,6 +109,9 @@ if [ ! -d $PROJECT ]; then
|
|||
cordova plugin add https://github.com/katzer/cordova-plugin-email-composer.git
|
||||
checkOK
|
||||
|
||||
cordova plugin add https://github.com/EddyVerbruggen/SocialSharing-PhoneGap-Plugin.git && cordova prepare
|
||||
checkOK
|
||||
|
||||
fi
|
||||
|
||||
if $DBGJS
|
||||
|
|
|
@ -17,9 +17,16 @@ angular.module('copayApp.controllers').controller('ReceiveController',
|
|||
}
|
||||
};
|
||||
|
||||
$scope.shareAddress = function(addr) {
|
||||
if (isCordova) {
|
||||
window.plugins.socialsharing.share('My bitcoin address: ' + addr);
|
||||
}
|
||||
};
|
||||
|
||||
$scope.init = function() {
|
||||
$rootScope.title = 'Receive';
|
||||
$scope.showAll = false;
|
||||
$scope.isCordova = isCordova;
|
||||
|
||||
var w = $rootScope.wallet;
|
||||
var lastAddr = _.first(w.getAddressesOrdered());
|
||||
|
|
|
@ -16,6 +16,12 @@
|
|||
<h4 class="size-12">{{addr}}</h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="m10t text-center" ng-show="isCordova">
|
||||
<a href class="button-setup"
|
||||
ng-click="shareAddress(addr)">
|
||||
<i class="fi-share"></i> Share address
|
||||
</a>
|
||||
</div>
|
||||
<div class="line-t m10t size-12">
|
||||
Share this with anyone to have them send you payments. To protect your privacy, new addresses are generated automatically once you use them.
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue