mirror of https://github.com/BTCPrivate/copay.git
Add copy to clipboard button
This commit is contained in:
parent
7d27ff70cb
commit
b60e8ed407
|
@ -19,6 +19,12 @@ angular.module('copayApp.controllers').controller('AddressesController',
|
|||
$scope.openAddressModal = function(address) {
|
||||
var ModalInstanceCtrl = function ($scope, $modalInstance, address) {
|
||||
$scope.address = address;
|
||||
$scope.isMobile = !!window.cordova;
|
||||
|
||||
$scope.mobileCopy = function(address) {
|
||||
window.cordova.plugins.clipboard.copy(address);
|
||||
window.plugins.toast.showShortBottom('Copied to clipboard');
|
||||
}
|
||||
|
||||
$scope.cancel = function () {
|
||||
$modalInstance.dismiss('cancel');
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
</p>
|
||||
<button class="m15t button secondary" open-external address="{{address.address}}">
|
||||
<i class="fi-link"> </i> Open in external application
|
||||
</button><br><br>
|
||||
<button class="m15t button secondary" ng-show="isMobile" ng-click="mobileCopy(address.address)">
|
||||
<i class="fi-link"> </i> Copy to clipboard
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue