add view on blockchain button

This commit is contained in:
Marty Alcala 2016-10-21 18:40:37 -04:00
parent 9620435379
commit d30aeff411
3 changed files with 25 additions and 1 deletions

View File

@ -191,6 +191,14 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
// });
// };
$scope.viewOnBlockchain = function() {
var btx = $scope.btx;
var url = 'https://' + ($scope.getShortNetworkName() == 'test' ? 'test-' : '') + 'insight.bitpay.com/tx/' + btx.txid;
var title = 'View Transaction on Insight';
var message = 'Would you like to view this transaction on the Insight blockchain explorer?';
$scope.openExternalLink(url, true, title, message, 'Open Insight', 'Go back');
};
$scope.openExternalLink = function(url, optIn, title, message, okText, cancelText) {
externalLinkService.open(url, optIn, title, message, okText, cancelText);
};

View File

@ -235,4 +235,11 @@
color: $item-label-color;
padding: 1rem 2rem;
}
.view-on-blockchain-btn {
//background: #EDEDED;
background: #e8e7e7;
color: rgba(58, 58, 58, .6);
margin-bottom: 1.5rem;
}
}

View File

@ -95,9 +95,18 @@
</div>
</div>
</div>
<!-- <button>
View on blockchain
</button> -->
<!-- <div class="zero-state-cta"> -->
<button class="view-on-blockchain-btn button button-standard button-primary" ng-click="viewOnBlockchain()" translate>
View on blockchain
</button>
<!-- </div> -->
</ion-content>
</ion-view>