Improve addressbook for mobile
This commit is contained in:
parent
f3d12f5a14
commit
ee33526129
6 changed files with 22 additions and 15 deletions
|
|
@ -22,7 +22,7 @@
|
||||||
<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 ng-if="!tx.merchant">
|
<span ng-if="!tx.merchant">
|
||||||
<contact address="{{tx.toAddress}}"></contact>
|
{{index.addressbook[tx.toAddress] || tx.toAddress}}
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -321,7 +321,9 @@
|
||||||
|
|
||||||
<div class="input">
|
<div class="input">
|
||||||
<input ng-show="sendForm.address.$invalid" class="m0" type="text" id="address" name="address" ng-disabled="home.blockUx || home.lockAddress" ng-attr-placeholder="{{'Bitcoin address'|translate}}" ng-model="_address" valid-address required ng-focus="home.formFocus('address')" ng-blur="home.formFocus(false)">
|
<input ng-show="sendForm.address.$invalid" class="m0" type="text" id="address" name="address" ng-disabled="home.blockUx || home.lockAddress" ng-attr-placeholder="{{'Bitcoin address'|translate}}" ng-model="_address" valid-address required ng-focus="home.formFocus('address')" ng-blur="home.formFocus(false)">
|
||||||
<contact class="addressbook-input" ng-if="!sendForm.address.$invalid && _address" address="{{_address}}"></contact>
|
<div class="addressbook-input" ng-show="!sendForm.address.$invalid && _address">
|
||||||
|
{{index.addressbook[_address] || _address}}
|
||||||
|
</div>
|
||||||
<a class="postfix size-12 m0 text-gray"
|
<a class="postfix size-12 m0 text-gray"
|
||||||
ng-click="openDestinationAddressModal(index.otherWallets, _address)">
|
ng-click="openDestinationAddressModal(index.otherWallets, _address)">
|
||||||
<i class="icon-wallet size-18"></i>
|
<i class="icon-wallet size-18"></i>
|
||||||
|
|
@ -516,8 +518,7 @@
|
||||||
<div class="size-14 text-gray columns m5t" ng-if="btx.message || btx.addressTo">
|
<div class="size-14 text-gray columns m5t" ng-if="btx.message || btx.addressTo">
|
||||||
<div ng-show="btx.message"><span translate>Note</span>: {{btx.message}}</div>
|
<div ng-show="btx.message"><span translate>Note</span>: {{btx.message}}</div>
|
||||||
<div ng-show="!btx.message">
|
<div ng-show="!btx.message">
|
||||||
<span translate>To</span>:
|
<span translate>To</span>: {{index.addressbook[btx.addressTo] || btx.addressTo}}
|
||||||
<contact address="{{btx.addressTo}}"></contact>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -253,12 +253,6 @@ ul.copayer-list img {
|
||||||
color: #A5B2BF;
|
color: #A5B2BF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.addresses .list-addr contact {
|
|
||||||
margin-left: 0;
|
|
||||||
font-size: 14px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
a.missing-copayers {
|
a.missing-copayers {
|
||||||
bottom: -34px;
|
bottom: -34px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, lodash, go, profileService, configService, isCordova, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, nodeWebkit, addonManager, feeService, isChromeApp, bwsError, txFormatService, uxLanguage, $state, glideraService, isMobile) {
|
angular.module('copayApp.controllers').controller('indexController', function($rootScope, $scope, $log, $filter, $timeout, lodash, go, profileService, configService, isCordova, rateService, storageService, addressService, gettext, gettextCatalog, amMoment, nodeWebkit, addonManager, feeService, isChromeApp, bwsError, txFormatService, uxLanguage, $state, glideraService, isMobile, addressbookService) {
|
||||||
var self = this;
|
var self = this;
|
||||||
var SOFT_CONFIRMATION_LIMIT = 12;
|
var SOFT_CONFIRMATION_LIMIT = 12;
|
||||||
self.isCordova = isCordova;
|
self.isCordova = isCordova;
|
||||||
|
|
@ -111,6 +111,7 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
self.copayers = [];
|
self.copayers = [];
|
||||||
self.updateColor();
|
self.updateColor();
|
||||||
self.updateAlias();
|
self.updateAlias();
|
||||||
|
self.setAddressbook();
|
||||||
|
|
||||||
self.initGlidera();
|
self.initGlidera();
|
||||||
|
|
||||||
|
|
@ -1007,12 +1008,26 @@ angular.module('copayApp.controllers').controller('indexController', function($r
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
self.setAddressbook = function() {
|
||||||
|
addressbookService.list(function(err, ab) {
|
||||||
|
if (err) {
|
||||||
|
$log.error('Error getting the addressbook');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
self.addressbook = ab;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
$rootScope.$on('Local/ClearHistory', function(event) {
|
$rootScope.$on('Local/ClearHistory', function(event) {
|
||||||
$log.debug('The wallet transaction history has been deleted');
|
$log.debug('The wallet transaction history has been deleted');
|
||||||
self.txHistory = [];
|
self.txHistory = [];
|
||||||
self.updateHistory();
|
self.updateHistory();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$rootScope.$on('Local/AddressbookUpdated', function(event) {
|
||||||
|
self.setAddressbook();
|
||||||
|
});
|
||||||
|
|
||||||
// UX event handlers
|
// UX event handlers
|
||||||
$rootScope.$on('Local/ColorUpdated', function(event) {
|
$rootScope.$on('Local/ColorUpdated', function(event) {
|
||||||
self.updateColor();
|
self.updateColor();
|
||||||
|
|
|
||||||
|
|
@ -272,6 +272,7 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
||||||
|
|
||||||
modalInstance.result.finally(function() {
|
modalInstance.result.finally(function() {
|
||||||
$rootScope.modalOpened = false;
|
$rootScope.modalOpened = false;
|
||||||
|
$rootScope.$emit('Local/AddressbookUpdated');
|
||||||
disableCloseModal();
|
disableCloseModal();
|
||||||
var m = angular.element(document.getElementsByClassName('reveal-modal'));
|
var m = angular.element(document.getElementsByClassName('reveal-modal'));
|
||||||
m.addClass(animationService.modalAnimated.slideOutDown);
|
m.addClass(animationService.modalAnimated.slideOutDown);
|
||||||
|
|
|
||||||
|
|
@ -174,10 +174,6 @@ angular.module('copayApp.directives')
|
||||||
element.append(addr);
|
element.append(addr);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
element.bind('click', function() {
|
|
||||||
selectText(element[0]);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}])
|
}])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue