fix transations details note and external link
This commit is contained in:
parent
9e810466b7
commit
2bdf4021d2
3 changed files with 15 additions and 6 deletions
|
|
@ -1,11 +1,11 @@
|
|||
<div class="padding">
|
||||
<input type="text" ng-model="comment" autofocus>
|
||||
<input type="text" ng-model="data.comment" autofocus>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<button class="button button-dark button-block" ng-click="commentPopupClose(comment)" translate>Cancel</button>
|
||||
<button class="button button-dark button-block" ng-click="commentPopupClose()" translate>Cancel</button>
|
||||
</div>
|
||||
<div class="col">
|
||||
<button class="button button-dark button-block" ng-click="commentPopupSave(comment)" translate>Save</button>
|
||||
<button class="button button-dark button-block" ng-click="commentPopupSave()" translate>Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@
|
|||
|
||||
<div ng-show="btx.txid" class="tx-details-blockchain">
|
||||
<div class="text-center m20t">
|
||||
<button class="button button-positive" ng-click="$root.openExternalLink('https://' +
|
||||
<button class="button button-positive" ng-click="openExternalLink('https://' +
|
||||
(getShortNetworkName() == 'test' ? 'test-' : '') + 'insight.bitpay.com/tx/' + btx.txid)">
|
||||
<span class="text-gray" translate>See it on the blockchain</span>
|
||||
</button>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('txDetailsController', function($rootScope, $log, $scope, $filter, $stateParams, $ionicPopup, gettextCatalog, profileService, configService, lodash, txFormatService) {
|
||||
angular.module('copayApp.controllers').controller('txDetailsController', function($rootScope, $log, $scope, $filter, $stateParams, $ionicPopup, gettextCatalog, profileService, configService, lodash, txFormatService, platformInfo) {
|
||||
|
||||
var self = $scope.self;
|
||||
var wallet = profileService.getWallet($stateParams.walletId);
|
||||
|
|
@ -36,7 +36,7 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
txid: $scope.btx.txid,
|
||||
};
|
||||
|
||||
if (!lodash.isEmpty($scope.data.comment)) {
|
||||
if ($scope.data.comment) {
|
||||
args.body = $scope.data.comment;
|
||||
};
|
||||
|
||||
|
|
@ -80,6 +80,15 @@ angular.module('copayApp.controllers').controller('txDetailsController', functio
|
|||
});
|
||||
};
|
||||
|
||||
$scope.openExternalLink = function(url, target) {
|
||||
if (platformInfo.isNW) {
|
||||
nodeWebkit.openExternalLink(url);
|
||||
} else {
|
||||
target = target || '_blank';
|
||||
var ref = window.open(url, target, 'location=no');
|
||||
}
|
||||
};
|
||||
|
||||
$scope.getShortNetworkName = function() {
|
||||
var n = wallet.credentials.network;
|
||||
return n.substring(0, 4);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue