Merge pull request #450 from gabrielbazan7/fix/amountWalletIcon

fix wallet icon amount view
This commit is contained in:
Matias Alejo Garcia 2016-10-14 10:05:22 -03:00 committed by GitHub
commit c4d1efcb9a
5 changed files with 6389 additions and 5 deletions

6380
angular-pbkdf2/angular-pbkdf2.js vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.toName = data.stateParams.toName;
$scope.toEmail = data.stateParams.toEmail;
$scope.showAlternativeAmount = !!$scope.cardId;
$scope.toColor = data.stateParams.toColor;
if (!$scope.cardId && !$stateParams.toAddress) {
$log.error('Bad params at amount')
@ -93,7 +94,7 @@ angular.module('copayApp.controllers').controller('amountController', function($
$scope.pushDigit = function(digit) {
if ($scope.amount && $scope.amount.length >= LENGTH_EXPRESSION_LIMIT) return;
if ($scope.amount.indexOf('.') > -1 && digit == '.') return;
if($scope.showAlternativeAmount && $scope.amount.indexOf('.') > -1 && $scope.amount[$scope.amount.indexOf('.') + 2]) return;
if ($scope.showAlternativeAmount && $scope.amount.indexOf('.') > -1 && $scope.amount[$scope.amount.indexOf('.') + 2]) return;
$scope.amount = ($scope.amount + digit).replace('..', '.');
checkFontSize();

View File

@ -102,7 +102,8 @@ angular.module('copayApp.controllers').controller('tabSendController', function(
isWallet: item.isWallet,
toAddress: addr,
toName: item.name,
toEmail: item.email
toEmail: item.email,
toColor: item.color
})
});
});

View File

@ -251,7 +251,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
*/
.state('tabs.send.amount', {
url: '/amount/:isWallet/:toAddress/:toName/:toEmail',
url: '/amount/:isWallet/:toAddress/:toName/:toEmail/:toColor',
views: {
'tab-send@tabs': {
controller: 'amountController',

View File

@ -13,14 +13,16 @@
<div class="item item-no-bottom-border" translate>Recipient</div>
<div class="item item-text-wrap item-icon-left bitcoin-address" ng-class="{'item-big-icon-left':cardId}">
<i ng-if="isWallet" class="icon ion-briefcase size-21"></i>
<i class="icon big-icon-svg" ng-if="isWallet">
<img src="img/icon-wallet.svg" ng-style="{'background-color': toColor}" class="bg"/>
</i>
<span ng-if="!isWallet">
<gravatar ng-if="!cardId" class="send-gravatar" name="{{toName}}" width="30" email="{{toEmail}}"></gravatar>
<i ng-if="cardId" class="icon big-icon-svg">
<div class="bg icon-bitpay-card"></div>
</i>
</span>
<span ng-class="{'m10l':cardId}">{{toName || toAddress}}</span>
<span class="m10l">{{toName || toAddress}}</span>
</div>
</div>