Fix UI custom fee

This commit is contained in:
Gustavo Maximiliano Cortez 2017-07-18 15:06:31 -03:00
parent f9c5730293
commit a85e671857
No known key found for this signature in database
GPG Key ID: 15EDAD8D9F2EB1AF
3 changed files with 24 additions and 29 deletions

View File

@ -4,7 +4,6 @@ angular.module('copayApp.controllers').controller('feeLevelsController', functio
var FEE_MULTIPLIER = 10; var FEE_MULTIPLIER = 10;
var FEE_MIN = 0; var FEE_MIN = 0;
var FEE_MAX = 1000000;
var showErrorAndClose = function(title, msg) { var showErrorAndClose = function(title, msg) {
title = title || gettextCatalog.getString('Error'); title = title || gettextCatalog.getString('Error');
@ -35,10 +34,10 @@ angular.module('copayApp.controllers').controller('feeLevelsController', functio
}; };
$scope.setFeesRecommended = function() { $scope.setFeesRecommended = function() {
$scope.minFeeAllowed = FEE_MIN; $scope.maxFeeRecommended = getMaxRecommended();
$scope.maxFeeAllowed = FEE_MAX;
$scope.maxFeeRecommended = getMaxRecommended() * FEE_MULTIPLIER;
$scope.minFeeRecommended = getMinRecommended(); $scope.minFeeRecommended = getMinRecommended();
$scope.minFeeAllowed = FEE_MIN;
$scope.maxFeeAllowed = $scope.maxFeeRecommended * FEE_MULTIPLIER;
}; };
$scope.checkFees = function(feePerSatByte) { $scope.checkFees = function(feePerSatByte) {

View File

@ -4,11 +4,14 @@
text-align: center; text-align: center;
background: #f9f9f9; background: #f9f9f9;
font-size: 11px; font-size: 11px;
height: 120px; height: 140px;
padding-top: 25px; padding-top: 25px;
.row { .row {
padding: 0; padding: 0;
} }
.col {
padding-top: 15px;
}
.separator { .separator {
border-left: 1px solid #d9d9df; border-left: 1px solid #d9d9df;
height: 75%; height: 75%;
@ -36,17 +39,8 @@
} }
} }
} }
.warning-fee {
padding: 5px 10px;
color: $v-warning-color;
font-size: 12px;
text-align: center;
i {
margin-right: 8px;
}
}
.error-fee { .error-fee {
padding: 5px 10px; padding: 8px 10px;
color: $v-error-color; color: $v-error-color;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;

View File

@ -49,20 +49,22 @@
<span class="unit">sat/byte</span> <span class="unit">sat/byte</span>
</label> </label>
</div> </div>
<div class="error-fee" ng-if="showError"> <div class="error-fee">
<i class="icon ion-close-circled"></i> <div ng-if="showError">
<span translate> <i class="icon ion-close-circled"></i>
Transactions without fee are not supported. <span translate>
</span> Transactions without fee are not supported.
</div> </span>
<div class="warning-fee" ng-if="showMinWarning || showMaxWarning"> </div>
<i class="icon ion-alert-circled"></i> <div ng-if="showMinWarning || showMaxWarning">
<span ng-if="showMinWarning" translate> <i class="icon ion-alert-circled"></i>
Your fee is lower than recommended. <span ng-if="showMinWarning" translate>
</span> Your fee is lower than recommended.
<span ng-if="showMaxWarning" translate> </span>
You should not set a fee higher than {{maxFeeRecommended}} satoshis/byte. <span ng-if="showMaxWarning" translate>
</span> You should not set a fee higher than {{maxFeeRecommended}} satoshis/byte.
</span>
</div>
</div> </div>
</div> </div>
</div> </div>