Fix and updates tx details
This commit is contained in:
parent
55e5ca031c
commit
0239dc187a
2 changed files with 19 additions and 20 deletions
|
|
@ -34,8 +34,10 @@
|
||||||
<p class="m0 text-gray size-14" translate>Moved</p>
|
<p class="m0 text-gray size-14" translate>Moved</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="size-36">
|
<div class="size-36" ng-click="txc.copyToClipboard(index.showTx.amountStr)">
|
||||||
<span ng-if="index.showTx.action == 'received'">+</span><span ng-if="index.showTx.action == 'sent'">-</span>{{index.showTx.amountStr}}
|
<span ng-if="index.showTx.action == 'received'">+</span>
|
||||||
|
<span ng-if="index.showTx.action == 'sent'">-</span>
|
||||||
|
<span class="enable_text_select">{{index.showTx.amountStr}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="alternative-amount" ng-click="showRate=!showRate" ng-init="showRate = false">
|
<div class="alternative-amount" ng-click="showRate=!showRate" ng-init="showRate = false">
|
||||||
<span class="label gray radius" ng-show="!showRate && alternativeAmountStr">
|
<span class="label gray radius" ng-show="!showRate && alternativeAmountStr">
|
||||||
|
|
@ -56,7 +58,7 @@
|
||||||
<ul class="no-bullet size-14 m0">
|
<ul class="no-bullet size-14 m0">
|
||||||
|
|
||||||
<li ng-if="!index.showTx.hasMultiplesOutputs && index.showTx.addressTo && index.showTx.addressTo != 'N/A'" class="line-b p10 oh"
|
<li ng-if="!index.showTx.hasMultiplesOutputs && index.showTx.addressTo && index.showTx.addressTo != 'N/A'" class="line-b p10 oh"
|
||||||
ng-click="copyAddress(index.showTx.addressTo)">
|
ng-click="txc.copyToClipboard(index.showTx.addressTo)">
|
||||||
<span class="text-gray" translate>To</span>
|
<span class="text-gray" translate>To</span>
|
||||||
<span class="right">
|
<span class="right">
|
||||||
<span ng-if="index.showTx.merchant">
|
<span ng-if="index.showTx.merchant">
|
||||||
|
|
@ -83,11 +85,6 @@
|
||||||
ng-repeat="output in index.showTx.outputs"
|
ng-repeat="output in index.showTx.outputs"
|
||||||
ng-include="'views/includes/output.html'">
|
ng-include="'views/includes/output.html'">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<li ng-show="btc.message" class="line-b p10 oh">
|
|
||||||
<span class="text-gray" translate>Note</span>
|
|
||||||
<span class="right">{{index.showTx.message}}</span>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li ng-if="index.showTx.action == 'invalid'" class="line-b p10 oh">
|
<li ng-if="index.showTx.action == 'invalid'" class="line-b p10 oh">
|
||||||
<span class="right" translate>
|
<span class="right" translate>
|
||||||
|
|
@ -95,22 +92,25 @@
|
||||||
</span>
|
</span>
|
||||||
<li ng-if="index.showTx.time" class="line-b p10 oh">
|
<li ng-if="index.showTx.time" class="line-b p10 oh">
|
||||||
<span class="text-gray" translate>Date</span>
|
<span class="text-gray" translate>Date</span>
|
||||||
<span class="right">
|
<span class="right enable_text_select">
|
||||||
<time>{{ index.showTx.time * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time>
|
<time>{{ index.showTx.time * 1000 | amDateFormat:'MM/DD/YYYY HH:mm a'}}</time>
|
||||||
<time>({{ index.showTx.time * 1000 | amTimeAgo}})</time>
|
<time>({{ index.showTx.time * 1000 | amTimeAgo}})</time>
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="line-b p10" ng-show="index.showTx.action != 'received'">
|
<li class="line-b p10" ng-show="index.showTx.action != 'received'"
|
||||||
|
ng-click="txc.copyToClipboard(index.showTx.feeStr)">
|
||||||
<span class="text-gray" translate>Fee</span>
|
<span class="text-gray" translate>Fee</span>
|
||||||
<span class="right">{{index.showTx.feeStr}}</span>
|
<span class="right enable_text_select">{{index.showTx.feeStr}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li class="line-b p10 oh" ng-if="index.showTx.message && index.showTx.action != 'received'">
|
<li class="line-b p10 oh" ng-if="index.showTx.message && index.showTx.action != 'received'"
|
||||||
|
ng-click="txc.copyToClipboard(index.showTx.message)">
|
||||||
<span class="text-gray" translate>Note</span>
|
<span class="text-gray" translate>Note</span>
|
||||||
<span class="right">{{index.showTx.message}}</span>
|
<span class="right enable_text_select">{{index.showTx.message}}</span>
|
||||||
</li>
|
</li>
|
||||||
<li ng-if="index.showTx.merchant" class="line-b p10 oh">
|
<li ng-if="index.showTx.merchant" class="line-b p10 oh"
|
||||||
|
ng-click="txc.copyToClipboard(index.showTx.merchant.pr.pd.memo)">
|
||||||
<span class="text-gray" translate>Merchant message</span>
|
<span class="text-gray" translate>Merchant message</span>
|
||||||
<span class="right">
|
<span class="right enable_text_select">
|
||||||
{{index.showTx.merchant.pr.pd.memo}}
|
{{index.showTx.merchant.pr.pd.memo}}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('txController',
|
angular.module('copayApp.controllers').controller('txController',
|
||||||
function($rootScope, $scope, $timeout, $filter, lodash, profileService, isCordova, nodeWebkit, configService, animationService) {
|
function($rootScope, $scope, $timeout, $filter, lodash, profileService, isCordova, nodeWebkit, configService, animationService, gettextCatalog) {
|
||||||
|
|
||||||
var fc = profileService.focusedClient;
|
var fc = profileService.focusedClient;
|
||||||
var config = configService.getSync();
|
var config = configService.getSync();
|
||||||
|
|
@ -50,13 +50,12 @@ angular.module('copayApp.controllers').controller('txController',
|
||||||
return n.substring(0, 4);
|
return n.substring(0, 4);
|
||||||
};
|
};
|
||||||
|
|
||||||
this.copyAddress = function(addr) {
|
this.copyToClipboard = function(value) {
|
||||||
if (!addr) return;
|
|
||||||
if (isCordova) {
|
if (isCordova) {
|
||||||
window.cordova.plugins.clipboard.copy(addr);
|
window.cordova.plugins.clipboard.copy(value);
|
||||||
window.plugins.toast.showShortCenter(gettextCatalog.getString('Copied to clipboard'));
|
window.plugins.toast.showShortCenter(gettextCatalog.getString('Copied to clipboard'));
|
||||||
} else if (nodeWebkit.isDefined()) {
|
} else if (nodeWebkit.isDefined()) {
|
||||||
nodeWebkit.writeToClipboard(addr);
|
nodeWebkit.writeToClipboard(value);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue