mirror of https://github.com/BTCPrivate/copay.git
Merge pull request #5332 from gabrielbazan7/fix/customAmount
fix design issue on specific amount feature
This commit is contained in:
commit
0ec25a003d
|
@ -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;
|
||||
|
|
|
@ -18,8 +18,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func
|
|||
|
||||
$scope.finish = function() {
|
||||
$ionicHistory.nextViewOptions({
|
||||
disableAnimate: false,
|
||||
historyRoot: true
|
||||
disableAnimate: false
|
||||
});
|
||||
$ionicHistory.goBack(-2);
|
||||
};
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
angular.module('copayApp.controllers').controller('tabReceiveController', function($rootScope, $scope, $timeout, $log, $ionicModal, $state, $ionicHistory, $ionicPopover, storageService, platformInfo, walletService, profileService, configService, lodash, gettextCatalog, popupService, bwcError) {
|
||||
|
||||
var listeners = [];
|
||||
var MENU_ITEM_HEIGHT = 55;
|
||||
$scope.isCordova = platformInfo.isCordova;
|
||||
$scope.isNW = platformInfo.isNW;
|
||||
$scope.walletAddrs = {};
|
||||
|
@ -50,8 +49,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 +140,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();
|
||||
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -47,7 +47,6 @@
|
|||
font-size: .9rem;
|
||||
}
|
||||
&.view-all {
|
||||
margin: 20px 0px 20px 0px;
|
||||
cursor: pointer;
|
||||
cursor: hand;
|
||||
i {
|
||||
|
|
|
@ -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> <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> <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>
|
||||
|
|
|
@ -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]">
|
||||
|
|
Loading…
Reference in New Issue