Adds three levels of dynamic fees

This commit is contained in:
Gustavo Maximiliano Cortez 2015-07-24 12:11:07 -03:00
commit 5742dee340
10 changed files with 241 additions and 110 deletions

View file

@ -0,0 +1,42 @@
<nav class="tab-bar">
<section class="left-small">
<a ng-click="cancel()" class="p10">
<span class="text-close" translate>Close</span>
</a>
</section>
<section class="middle tab-bar-section">
<h1 class="title ellipsis" ng-style="{'color':color}" translate>
Bitcoin Network Fee Policy
</h1>
</section>
</nav>
<div class="modal-content fix-modals-touch" ng-controller="preferencesFeeController as prefFee">
<ul class="no-bullet m0 size-14">
<h4 class="title m0" translate>Fee level [{{network}}]</h4>
<li ng-repeat="fee in (network == 'livenet' ? feeLevels.livenet : feeLevels.testnet)" ng-click="save(fee.level)" class="line-b p20">
<span ng-show="fee.level == 'priority'" translate>Priority</span>
<span ng-show="fee.level == 'normal'" translate>Normal</span>
<span ng-show="fee.level == 'economy'" translate>Economy</span>
<span class="size-12 text-light" translate>{{fee.feePerKBUnit}} per kB</span>
<i class="fi-check size-16 right" ng-show="currentFeeLevel == fee.level"></i>
</li>
</ul>
<div class="row column m20t">
<div class="text-gray size-12 text-center" ng-repeat="fee in (network == 'livenet' ? feeLevels.livenet :
feeLevels.testnet)" ng-if="fee.level == currentFeeLevel">
<span translate>Average confirmation time: {{fee.nbBlocks * 10}} minutes</span>
</div>
</div>
<div class="row column m20t">
<div class="text-gray size-12 text-center" translate>
Bitcoin transactions may include a fee collected by miners on the network. The higher the fee, the greater the incentive a miner has to include that transaction in a block.
</div>
</div>
<div class="extra-margin-bottom"></div>
</div>

View file

@ -77,13 +77,6 @@
{{preferences.selectedAlternative.name}}
</span>
</li>
<li class="line-b p20" ng-click="$root.go('preferencesFee')">
<span translate>Bitcoin Network Fee Policy</span>
<span class="right text-gray">
<i class="icon-arrow-right3 size-24 right"></i>
{{preferences.feeName|translate}}
</span>
</li>
<li class="line-b p20" ng-click="$root.go('preferencesBwsUrl')">

View file

@ -1,22 +0,0 @@
<div
class="topbar-container"
ng-include="'views/includes/topbar.html'"
ng-init="titleSection='Bitcoin Network Fee Policy'; goBackToState = 'preferences'; noColor = true">
</div>
<div class="content preferences" ng-controller="preferencesFeeController as prefFee">
<div ng-repeat="fee in prefFee.feeOpts" ng-click="prefFee.save(fee)" class="line-b p20 size-14">
<span ng-if="fee.red" style="color:red">{{fee.name|translate}} (<span translate>{{fee.value}} bits per kB</span>)</span>
<span ng-if="!fee.red">{{fee.name|translate}} (<span translate>{{fee.value}} bits per kB</span>)</span>
<i class="fi-check size-16 right" ng-show="prefFee.feeName == fee.name"></i>
</div>
<div class="row column m20t">
<div class="text-gray size-12 text-center m20b" translate>
Bitcoin transactions may include a fee collected by miners on the network. The higher the fee, the greater the incentive a miner has to include that transaction in a block. The Emergency level should only be used when there is a network congestion.
</div>
</div>
</div>
<div class="extra-margin-bottom"></div>

View file

@ -398,6 +398,17 @@
</div>
</div>
</div>
<div class="text-right size-12 m10b">
<span ng-repeat="fee in (index.network == 'livenet' ? index.feeLevels.livenet : index.feeLevels.testnet)"
ng-show="index.currentFeeLevel == fee.level">
<span translate>Fee</span>:
<span class="text-light" translate>{{fee.feePerKBUnit}} per kB</span>
(<span translate>Average confirmation time: {{fee.nbBlocks * 10}} minutes</span>)
</span>
<a href ng-click="home.openFeeModal(index.feeLevels, index.currentFeeLevel)" translate>Change</a>
</div>
<div class="row">
<div class="large-12 columns">
<label for="comment"><span translate>Note</span>