fix design issue on specific amount feature

This commit is contained in:
Gabriel Bazán 2016-12-22 15:13:53 -03:00
commit 73c2b4488a
6 changed files with 20 additions and 40 deletions

View file

@ -100,6 +100,13 @@ angular.module('copayApp.controllers').controller('addressesController', functio
});
};
$scope.requestSpecificAmount = function() {
$state.go('tabs.receive.amount', {
customAmount: true,
toAddress: $stateParams.toAddress
});
}
$scope.showInformation = function() {
$timeout(function() {
$scope.showInfo = !$scope.showInfo;

View file

@ -50,8 +50,9 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
};
$scope.showAddresses = function() {
$state.transitionTo('tabs.receive.addresses', {
walletId: $scope.wallet.credentials.walletId
$state.go('tabs.receive.addresses', {
walletId: $scope.wallet.credentials.walletId,
toAddress: $scope.addr
});
};
@ -140,31 +141,6 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
});
};
var goRequestAmount = function() {
$scope.menu.hide();
$state.go('tabs.receive.amount', {
customAmount: true,
toAddress: $scope.addr
});
}
$scope.showMenu = function(allAddresses, $event) {
var requestAmountObj = {
text: gettextCatalog.getString('Request Specific amount'),
action: goRequestAmount,
};
$scope.items = [requestAmountObj];
$scope.height = $scope.items.length * MENU_ITEM_HEIGHT;
$ionicPopover.fromTemplateUrl('views/includes/menu-popover.html', {
scope: $scope
}).then(function(popover) {
$scope.menu = popover;
$scope.menu.show($event);
});
};
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.wallets = profileService.getWallets();

View file

@ -614,7 +614,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*/
.state('tabs.receive.addresses', {
url: '/addresses/:walletId',
url: '/addresses/:walletId/:toAddress',
views: {
'tab-receive@tabs': {
controller: 'addressesController',

View file

@ -47,7 +47,6 @@
font-size: .9rem;
}
&.view-all {
margin: 20px 0px 20px 0px;
cursor: pointer;
cursor: hand;
i {

View file

@ -26,11 +26,19 @@
<div class="addr-explanation" ng-if="showInfo">
<div class="addr-description">
<span translate>It's a good idea to avoid reusing addresses-this both protects your privacy and keeps your bitcoins secure against hypothetical attacks by quantum computers.</span>&nbsp<a ng-click="showInformation()" translate>Hide</a>
<span translate>It's a good idea to avoid reusing addresses - this both protects your privacy and keeps your bitcoins secure against hypothetical attacks by quantum computers.</span>&nbsp<a ng-click="showInformation()" translate>Hide</a>
</div>
</div>
<div class="list">
<div class="item item-icon-right view-all" ng-show="viewAll.value" ng-click="requestSpecificAmount()">
<span translate>Request Specific amount</span>
<i class="icon ion-ios-arrow-thin-right"></i>
</div>
<div class="item item-icon-right view-all" ng-show="viewAll.value" ng-click="viewAllAddresses()">
<span translate>View All Addresses</span>
<i class="icon ion-ios-arrow-thin-right"></i>
</div>
<div class="item item-divider item-icon-right" ng-click="newAddress()">
<span translate>Unused Addresses</span>
<i class="icon ion-ios-plus-empty"></i>
@ -61,11 +69,6 @@
<div class="addr-balance">{{w.balanceStr}}</div>
</div>
</div>
<div class="item item-icon-right view-all" ng-show="viewAll.value" ng-click="viewAllAddresses()">
<span translate>View All Addresses</span>
<i class="icon ion-ios-arrow-thin-right"></i>
</div>
</div>
</div>
</ion-content>

View file

@ -1,11 +1,6 @@
<ion-view id="tab-receive">
<ion-nav-bar class="bar-royal">
<ion-nav-title>{{'Receive' | translate}}</ion-nav-title>
<ion-nav-buttons side="secondary">
<button ng-disabled="generatingAddress" class="button back-button" ng-click="showMenu(false, $event)">
<i class="icon ion-ios-more"></i>
</button>
</ion-nav-buttons>
</ion-nav-bar>
<ion-content scroll="false">
<article class="list card padding text-center" ng-if="!wallets[0]">