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

View File

@ -4,11 +4,14 @@
text-align: center;
background: #f9f9f9;
font-size: 11px;
height: 120px;
height: 140px;
padding-top: 25px;
.row {
padding: 0;
}
.col {
padding-top: 15px;
}
.separator {
border-left: 1px solid #d9d9df;
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 {
padding: 5px 10px;
padding: 8px 10px;
color: $v-error-color;
font-size: 12px;
text-align: center;

View File

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