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() {
|
$scope.showInformation = function() {
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
$scope.showInfo = !$scope.showInfo;
|
$scope.showInfo = !$scope.showInfo;
|
||||||
|
|
|
@ -18,8 +18,7 @@ angular.module('copayApp.controllers').controller('customAmountController', func
|
||||||
|
|
||||||
$scope.finish = function() {
|
$scope.finish = function() {
|
||||||
$ionicHistory.nextViewOptions({
|
$ionicHistory.nextViewOptions({
|
||||||
disableAnimate: false,
|
disableAnimate: false
|
||||||
historyRoot: true
|
|
||||||
});
|
});
|
||||||
$ionicHistory.goBack(-2);
|
$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) {
|
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 listeners = [];
|
||||||
var MENU_ITEM_HEIGHT = 55;
|
|
||||||
$scope.isCordova = platformInfo.isCordova;
|
$scope.isCordova = platformInfo.isCordova;
|
||||||
$scope.isNW = platformInfo.isNW;
|
$scope.isNW = platformInfo.isNW;
|
||||||
$scope.walletAddrs = {};
|
$scope.walletAddrs = {};
|
||||||
|
@ -50,8 +49,9 @@ angular.module('copayApp.controllers').controller('tabReceiveController', functi
|
||||||
};
|
};
|
||||||
|
|
||||||
$scope.showAddresses = function() {
|
$scope.showAddresses = function() {
|
||||||
$state.transitionTo('tabs.receive.addresses', {
|
$state.go('tabs.receive.addresses', {
|
||||||
walletId: $scope.wallet.credentials.walletId
|
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.$on("$ionicView.beforeEnter", function(event, data) {
|
||||||
$scope.wallets = profileService.getWallets();
|
$scope.wallets = profileService.getWallets();
|
||||||
|
|
||||||
|
|
|
@ -614,7 +614,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
||||||
*/
|
*/
|
||||||
|
|
||||||
.state('tabs.receive.addresses', {
|
.state('tabs.receive.addresses', {
|
||||||
url: '/addresses/:walletId',
|
url: '/addresses/:walletId/:toAddress',
|
||||||
views: {
|
views: {
|
||||||
'tab-receive@tabs': {
|
'tab-receive@tabs': {
|
||||||
controller: 'addressesController',
|
controller: 'addressesController',
|
||||||
|
|
|
@ -47,7 +47,6 @@
|
||||||
font-size: .9rem;
|
font-size: .9rem;
|
||||||
}
|
}
|
||||||
&.view-all {
|
&.view-all {
|
||||||
margin: 20px 0px 20px 0px;
|
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
cursor: hand;
|
cursor: hand;
|
||||||
i {
|
i {
|
||||||
|
|
|
@ -26,11 +26,19 @@
|
||||||
|
|
||||||
<div class="addr-explanation" ng-if="showInfo">
|
<div class="addr-explanation" ng-if="showInfo">
|
||||||
<div class="addr-description">
|
<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>
|
</div>
|
||||||
|
|
||||||
<div class="list">
|
<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()">
|
<div class="item item-divider item-icon-right" ng-click="newAddress()">
|
||||||
<span translate>Unused Addresses</span>
|
<span translate>Unused Addresses</span>
|
||||||
<i class="icon ion-ios-plus-empty"></i>
|
<i class="icon ion-ios-plus-empty"></i>
|
||||||
|
@ -61,11 +69,6 @@
|
||||||
<div class="addr-balance">{{w.balanceStr}}</div>
|
<div class="addr-balance">{{w.balanceStr}}</div>
|
||||||
</div>
|
</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>
|
||||||
</div>
|
</div>
|
||||||
</ion-content>
|
</ion-content>
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
<ion-view id="tab-receive">
|
<ion-view id="tab-receive">
|
||||||
<ion-nav-bar class="bar-royal">
|
<ion-nav-bar class="bar-royal">
|
||||||
<ion-nav-title>{{'Receive' | translate}}</ion-nav-title>
|
<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-nav-bar>
|
||||||
<ion-content scroll="false">
|
<ion-content scroll="false">
|
||||||
<article class="list card padding text-center" ng-if="!wallets[0]">
|
<article class="list card padding text-center" ng-if="!wallets[0]">
|
||||||
|
|
Loading…
Reference in New Issue