Merge pull request #654 from cmgustavo/bug/tx-details-copy-clipboard
Fix show contact name
This commit is contained in:
commit
f740db7e39
5 changed files with 12 additions and 9 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('tabHomeController',
|
angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, gettextCatalog, lodash, popupService, ongoingProcess, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window, bitpayCardService, startupService) {
|
function($rootScope, $timeout, $scope, $state, $stateParams, $ionicModal, $ionicScrollDelegate, gettextCatalog, lodash, popupService, ongoingProcess, profileService, walletService, configService, $log, platformInfo, storageService, txpModalService, $window, bitpayCardService, startupService, addressbookService) {
|
||||||
var wallet;
|
var wallet;
|
||||||
var listeners = [];
|
var listeners = [];
|
||||||
var notifications = [];
|
var notifications = [];
|
||||||
|
|
@ -230,6 +230,11 @@ angular.module('copayApp.controllers').controller('tabHomeController',
|
||||||
nextStep();
|
nextStep();
|
||||||
updateAllWallets();
|
updateAllWallets();
|
||||||
|
|
||||||
|
addressbookService.list(function(err, ab) {
|
||||||
|
if (err) $log.error(err);
|
||||||
|
$scope.addressbook = ab || {};
|
||||||
|
});
|
||||||
|
|
||||||
listeners = [
|
listeners = [
|
||||||
$rootScope.$on('bwsEvent', function(e, walletId, type, n) {
|
$rootScope.$on('bwsEvent', function(e, walletId, type, n) {
|
||||||
var wallet = profileService.getWallet(walletId);
|
var wallet = profileService.getWallet(walletId);
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
</ion-nav-back-button>
|
</ion-nav-back-button>
|
||||||
<ion-nav-title>BitPay Visa<sup>®</sup> Card</ion-nav-title>
|
<ion-nav-title>BitPay Visa<sup>®</sup> Card</ion-nav-title>
|
||||||
<ion-nav-buttons side="secondary">
|
<ion-nav-buttons side="secondary">
|
||||||
<button class="button no-border" ng-show="!error" ui-sref="tabs.bitpayCard.preferences">
|
<button class="button no-border" ui-sref="tabs.bitpayCard.preferences">
|
||||||
<i class="icon ion-ios-settings"></i>
|
<i class="icon ion-ios-settings"></i>
|
||||||
</button>
|
</button>
|
||||||
</ion-nav-buttons>
|
</ion-nav-buttons>
|
||||||
|
|
|
||||||
|
|
@ -4,8 +4,8 @@
|
||||||
{{tx.amountStr}}
|
{{tx.amountStr}}
|
||||||
</div>
|
</div>
|
||||||
<span ng-show="!tx.merchant">
|
<span ng-show="!tx.merchant">
|
||||||
<span ng-show="addressbook[tx.toAddress] && !tx.message">
|
<span ng-show="addressbook[tx.toAddress] && addressbook[tx.toAddress].name && !tx.message">
|
||||||
{{addressbook[tx.toAddress]}}
|
{{addressbook[tx.toAddress].name}}
|
||||||
</span>
|
</span>
|
||||||
<span class="ellipsis" ng-show="!addressbook[tx.toAddress] && tx.message">
|
<span class="ellipsis" ng-show="!addressbook[tx.toAddress] && tx.message">
|
||||||
{{tx.message}}
|
{{tx.message}}
|
||||||
|
|
@ -18,8 +18,6 @@
|
||||||
<span ng-show="tx.merchant.pr.ca"><i class="fi-lock"></i> {{tx.merchant.domain}}</span>
|
<span ng-show="tx.merchant.pr.ca"><i class="fi-lock"></i> {{tx.merchant.domain}}</span>
|
||||||
<span ng-show="!tx.merchant.pr.ca"><i class="fi-unlock"></i> {{tx.merchant.domain}}</span>
|
<span ng-show="!tx.merchant.pr.ca"><i class="fi-unlock"></i> {{tx.merchant.domain}}</span>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
|
||||||
</span>
|
|
||||||
|
|
||||||
<p class="wallet-activity-note">
|
<p class="wallet-activity-note">
|
||||||
<i class="icon ion-record wallet-activity-note-child" ng-style="{'color':tx.wallet.color}"></i>
|
<i class="icon ion-record wallet-activity-note-child" ng-style="{'color':tx.wallet.color}"></i>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<span class="payment-proposal-to">
|
<span class="payment-proposal-to">
|
||||||
<img ng-if="!cardId" src="img/icon-bitcoin-small.svg">
|
<img ng-if="!cardId" src="img/icon-bitcoin-small.svg">
|
||||||
<img ng-if="cardId" src="img/icon-card.svg" width="34">
|
<img ng-if="cardId" src="img/icon-card.svg" width="34">
|
||||||
<div copy-to-clipboard="toAddress" class="ellipsis">
|
<div copy-to-clipboard="btx.addressTo" class="ellipsis">
|
||||||
<contact ng-if="!toName" address="{{btx.addressTo}}" class="ellipsis" style="display: block;"></contact>
|
<contact ng-if="!toName" address="{{btx.addressTo}}" class="ellipsis" style="display: block;"></contact>
|
||||||
<span class="m15l size-14" ng-if="toName">{{toName}}</span>
|
<span class="m15l size-14" ng-if="toName">{{toName}}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -158,10 +158,10 @@
|
||||||
<div ng-show="btx.action == 'sent'" class="ellipsis">
|
<div ng-show="btx.action == 'sent'" class="ellipsis">
|
||||||
<div ng-if="btx.message">{{btx.message}}</div>
|
<div ng-if="btx.message">{{btx.message}}</div>
|
||||||
<div ng-if="!btx.message && btx.note.body">{{btx.note.body}}</div>
|
<div ng-if="!btx.message && btx.note.body">{{btx.note.body}}</div>
|
||||||
<div ng-if="!btx.message && !btx.note.body && addressbook[btx.addressTo]">
|
<div ng-if="!btx.message && !btx.note.body && addressbook[btx.addressTo] && addressbook[btx.addressTo].name">
|
||||||
{{addressbook[btx.addressTo].name}}
|
{{addressbook[btx.addressTo].name}}
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="!btx.message && !btx.note.body && !addressbook[btx.addressTo]" translate>Sent</div>
|
<div ng-if="!btx.message && !btx.note.body && !(addressbook[btx.addressTo] && addressbook[btx.addressTo].name)" translate>Sent</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div ng-show="btx.action == 'moved'" class="ellipsis">
|
<div ng-show="btx.action == 'moved'" class="ellipsis">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue