Browse Source

Blocks & USD Price

cd www
ember install ember-truth-helpers

https://www.npmjs.com/package/ember-truth-helpers
master
yuriy0803 2 years ago
parent
commit
a08408fec1
  1. 64
      www/app/templates/account/rewards.hbs

64
www/app/templates/account/rewards.hbs

@ -2,14 +2,35 @@
{{#if model.rewards}} {{#if model.rewards}}
<h4>Your Latest Rewards</h4> <h4>Your Latest Rewards</h4>
<table class="table table-condensed table-striped"> <table class="table table-condensed table-striped">
{{#each model.sumrewards as |sumreward|}} <thead>
<tr> <tr>
<td>{{sumreward.name}}</td> <th>Time</th>
<td>{{format-balance sumreward.reward}}</td> <th>Blocks</th>
</tr> <th>Amount</th>
{{/each}} <th>USD</th>
</table> </tr>
<span class="label label-default">Immature</span> <span class="label label-success">Matured</span> </thead>
<tbody>
{{#each model.sumrewards as |sumreward|}}
<tr>
<td>{{sumreward.name}}</td>
<td>{{sumreward.blocks}}</td>
<td>{{format-balance sumreward.reward}}</td>
<td><em>
{{#if (eq config.Currency 'USD') }}
{{format-ethusd sumreward.reward model.exchangedata.current_price}}
{{else}}
{{format-ethinr sumreward.reward model.exchangedata.price_inr}}
{{/if}}
</em></td>
</tr>
{{/each}}
</tbody>
</table>
<span class="label label-default">Immature</span> <span class="label label-success">Matured</span>
<table class="table table-condensed table-striped"> <table class="table table-condensed table-striped">
<thead> <thead>
<tr> <tr>
@ -17,26 +38,27 @@
<th>Time Found</th> <th>Time Found</th>
<th>Reward</th> <th>Reward</th>
<th>Round Share</th> <th>Round Share</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{{#each model.rewards as |tx|}} {{#each model.rewards as |tx|}}
<tr> <tr>
<td>{{format-number tx.blockheight}}</td> <td>{{format-number tx.blockheight}}</td>
<td>{{format-date-locale tx.timestamp}}</td> <td>{{format-date-locale tx.timestamp}}</td>
<td> <td>
{{#if tx.immature}} {{#if tx.immature}}
<span class="label label-default">{{format-balance tx.reward}}</span> <span class="label label-default">{{format-balance tx.reward}}</span>
{{else}} {{else}}
<span class="label label-success">{{format-balance tx.reward}}</span> <span class="label label-success">{{format-balance tx.reward}}</span>
{{/if}} {{/if}}
</td> </td>
<td>{{format-number tx.percent style='percent' maximumFractionDigits='2'}}</td> <td>{{format-number tx.percent style='percent' maximumFractionDigits='2'}}</td>
</tr> </tr>
{{/each}} {{/each}}
</tbody> </tbody>
</table> </table>
{{else}} {{else}}
<h3>No rewards yet</h3> <h3>No rewards yet</h3>
{{/if}} {{/if}}
</div> </div>
Loading…
Cancel
Save