Skip to content

Commit 27781c1

Browse files
frankurcrazysammy007
authored andcommitted
Make tables responsive
1 parent 3d79762 commit 27781c1

File tree

8 files changed

+168
-151
lines changed

8 files changed

+168
-151
lines changed

www/app/templates/account/index.hbs

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
<div class="container">
22
{{#if model.workers}}
33
<h4>Your Workers</h4>
4-
<table class="table table-condensed table-striped">
5-
<thead>
6-
<tr>
7-
<th>ID</th>
8-
<th>Hashrate (rough, short average)</th>
9-
<th>Hashrate (accurate, long average)</th>
10-
<th>Last Share</th>
11-
</tr>
12-
</thead>
13-
<tbody>
14-
{{#each-in model.workers as |k v|}}
15-
<tr class="{{if v.offline "warning" "success"}}">
16-
<td>{{k}}</td>
17-
<td>{{format-hashrate v.hr}}</td>
18-
<td>{{format-hashrate v.hr2}}</td>
19-
<td>{{format-relative (seconds-to-ms v.lastBeat)}}</td>
4+
<div class="table-responsive">
5+
<table class="table table-condensed table-striped">
6+
<thead>
7+
<tr>
8+
<th>ID</th>
9+
<th>Hashrate (rough, short average)</th>
10+
<th>Hashrate (accurate, long average)</th>
11+
<th>Last Share</th>
2012
</tr>
21-
{{/each-in}}
22-
</tbody>
23-
</table>
13+
</thead>
14+
<tbody>
15+
{{#each-in model.workers as |k v|}}
16+
<tr class="{{if v.offline "warning" "success"}}">
17+
<td>{{k}}</td>
18+
<td>{{format-hashrate v.hr}}</td>
19+
<td>{{format-hashrate v.hr2}}</td>
20+
<td>{{format-relative (seconds-to-ms v.lastBeat)}}</td>
21+
</tr>
22+
{{/each-in}}
23+
</tbody>
24+
</table>
25+
</div>
2426
{{else}}
2527
<h3>No workers online</h3>
2628
{{/if}}

www/app/templates/account/payouts.hbs

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
<div class="container">
22
{{#if model.payments}}
33
<h4>Your Latest Payouts</h4>
4-
<table class="table table-condensed table-striped">
5-
<thead>
6-
<tr>
7-
<th>Time</th>
8-
<th>Tx ID</th>
9-
<th>Amount</th>
10-
</tr>
11-
</thead>
12-
<tbody>
13-
{{#each model.payments as |tx|}}
4+
<div class="table-responsive">
5+
<table class="table table-condensed table-striped">
6+
<thead>
147
<tr>
15-
<td>{{format-date-locale tx.timestamp}}</td>
16-
<td>
17-
<a href="https://etherscan.io/tx/{{tx.tx}}" class="hash" rel="nofollow" target="_blank">{{tx.tx}}</a>
18-
</td>
19-
<td>{{format-balance tx.amount}}</td>
8+
<th>Time</th>
9+
<th>Tx ID</th>
10+
<th>Amount</th>
2011
</tr>
21-
{{/each}}
22-
</tbody>
23-
</table>
12+
</thead>
13+
<tbody>
14+
{{#each model.payments as |tx|}}
15+
<tr>
16+
<td>{{format-date-locale tx.timestamp}}</td>
17+
<td>
18+
<a href="https://etherscan.io/tx/{{tx.tx}}" class="hash" rel="nofollow" target="_blank">{{tx.tx}}</a>
19+
</td>
20+
<td>{{format-balance tx.amount}}</td>
21+
</tr>
22+
{{/each}}
23+
</tbody>
24+
</table>
25+
</div>
2426
{{else}}
2527
<h3>No payouts yet</h3>
2628
{{/if}}

www/app/templates/blocks/immature.hbs

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
{{#if model.immature}}
22
<h4>Immature Blocks</h4>
3-
<table class="table table-condensed table-striped">
4-
<thead>
5-
<tr>
6-
<th>Height</th>
7-
<th>Block Hash</th>
8-
<th>Time Found</th>
9-
<th>Variance</th>
10-
<th>Reward</th>
11-
</tr>
12-
</thead>
13-
<tbody>
14-
{{#each model.immature as |block|}}
15-
{{partial "blocks/block"}}
16-
{{/each}}
17-
</tbody>
18-
</table>
3+
4+
<div class="table-responsive">
5+
<table class="table table-condensed table-striped">
6+
<thead>
7+
<tr>
8+
<th>Height</th>
9+
<th>Block Hash</th>
10+
<th>Time Found</th>
11+
<th>Variance</th>
12+
<th>Reward</th>
13+
</tr>
14+
</thead>
15+
<tbody>
16+
{{#each model.immature as |block|}}
17+
{{partial "blocks/block"}}
18+
{{/each}}
19+
</tbody>
20+
</table>
21+
</div>
1922
{{else}}
2023
<h3>No immature blocks yet</h3>
2124
{{/if}}

www/app/templates/blocks/index.hbs

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
{{#if model.matured}}
22
<h4>Matured Blocks</h4>
3-
<table class="table table-condensed table-striped">
4-
<thead>
5-
<tr>
6-
<th>Height</th>
7-
<th>Block Hash</th>
8-
<th>Time Found</th>
9-
<th>Variance</th>
10-
<th>Reward</th>
11-
</tr>
12-
</thead>
13-
<tbody>
14-
{{#each model.matured as |block|}}
15-
{{partial "blocks/block"}}
16-
{{/each}}
17-
</tbody>
18-
</table>
3+
<div class="table-responsive">
4+
<table class="table table-condensed table-striped">
5+
<thead>
6+
<tr>
7+
<th>Height</th>
8+
<th>Block Hash</th>
9+
<th>Time Found</th>
10+
<th>Variance</th>
11+
<th>Reward</th>
12+
</tr>
13+
</thead>
14+
<tbody>
15+
{{#each model.matured as |block|}}
16+
{{partial "blocks/block"}}
17+
{{/each}}
18+
</tbody>
19+
</table>
20+
</div>
1921
{{else}}
2022
<h3>No matured blocks yet</h3>
2123
{{/if}}

www/app/templates/blocks/pending.hbs

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
{{#if model.candidates}}
22
<h4>Recently Found Blocks</h4>
3-
<table class="table table-condensed table-striped">
4-
<thead>
5-
<tr>
6-
<th>Height</th>
7-
<th>Time Found</th>
8-
<th>Variance</th>
9-
</tr>
10-
</thead>
11-
<tbody>
12-
{{#each model.candidates as |block|}}
13-
<tr>
14-
<td><a href="https://etherscan.io/block/{{block.height}}" rel="nofollow" target="_blank">{{format-number block.height}}</a></td>
15-
<td>{{format-date-locale block.timestamp}}</td>
16-
<td>
17-
{{#if block.isLucky}}
18-
<span class="label label-success">{{format-number block.variance style='percent'}}</span>
19-
{{else}}
20-
<span class="label label-info">{{format-number block.variance style='percent'}}</span>
21-
{{/if}}
22-
</td>
23-
</tr>
24-
{{/each}}
25-
</tbody>
26-
</table>
3+
<div class="table-responsive">
4+
<table class="table table-condensed table-striped">
5+
<thead>
6+
<tr>
7+
<th>Height</th>
8+
<th>Time Found</th>
9+
<th>Variance</th>
10+
</tr>
11+
</thead>
12+
<tbody>
13+
{{#each model.candidates as |block|}}
14+
<tr>
15+
<td><a href="https://etherscan.io/block/{{block.height}}" rel="nofollow" target="_blank">{{format-number block.height}}</a></td>
16+
<td>{{format-date-locale block.timestamp}}</td>
17+
<td>
18+
{{#if block.isLucky}}
19+
<span class="label label-success">{{format-number block.variance style='percent'}}</span>
20+
{{else}}
21+
<span class="label label-info">{{format-number block.variance style='percent'}}</span>
22+
{{/if}}
23+
</td>
24+
</tr>
25+
{{/each}}
26+
</tbody>
27+
</table>
28+
</div>
2729
{{else}}
2830
<h3>No new blocks yet</h3>
2931
{{/if}}

www/app/templates/luck.hbs

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
1-
<table class="table table-condensed table-striped">
2-
<thead>
1+
<div class="table-responsive">
2+
<table class="table table-condensed table-striped">
3+
<thead>
4+
<tr>
5+
<th>Blocks</th>
6+
<th>Shares/Diff</th>
7+
<th>Uncle Rate</th>
8+
<th>Orphan Rate</th>
9+
</tr>
10+
</thead>
11+
<tbody>
12+
{{#each-in model.luck as |total row|}}
313
<tr>
4-
<th>Blocks</th>
5-
<th>Shares/Diff</th>
6-
<th>Uncle Rate</th>
7-
<th>Orphan Rate</th>
14+
<td>{{total}}</td>
15+
<td>{{format-number row.luck style='percent'}}</td>
16+
<td>{{format-number row.uncleRate style='percent'}}</td>
17+
<td>{{format-number row.orphanRate style='percent'}}</td>
818
</tr>
9-
</thead>
10-
<tbody>
11-
{{#each-in model.luck as |total row|}}
12-
<tr>
13-
<td>{{total}}</td>
14-
<td>{{format-number row.luck style='percent'}}</td>
15-
<td>{{format-number row.uncleRate style='percent'}}</td>
16-
<td>{{format-number row.orphanRate style='percent'}}</td>
17-
</tr>
18-
{{/each-in}}
19-
</tbody>
20-
</table>
19+
{{/each-in}}
20+
</tbody>
21+
</table>
22+
</div>

www/app/templates/miners.hbs

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,26 @@
77
<div class="container">
88
{{#if model.miners}}
99
<h4>Miners</h4>
10-
<table class="table table-condensed table-striped">
11-
<thead>
12-
<tr>
13-
<th>Login</th>
14-
<th>Hashrate</th>
15-
<th>Last Beat</th>
16-
</tr>
17-
</thead>
18-
<tbody>
19-
{{#each model.miners as |m|}}
20-
<tr class="{{if m.offline "warning"}}">
21-
<td>{{#link-to 'account' m.login class='hash'}}{{m.login}}{{/link-to}}</td>
22-
<td>{{format-hashrate m.hr}}</td>
23-
<td>{{format-date-locale m.lastBeat}}</td>
24-
</tr>
25-
{{/each}}
26-
</tbody>
27-
</table>
10+
<div class="table-responsive">
11+
<table class="table table-condensed table-striped">
12+
<thead>
13+
<tr>
14+
<th>Login</th>
15+
<th>Hashrate</th>
16+
<th>Last Beat</th>
17+
</tr>
18+
</thead>
19+
<tbody>
20+
{{#each model.miners as |m|}}
21+
<tr class="{{if m.offline "warning"}}">
22+
<td>{{#link-to 'account' m.login class='hash'}}{{m.login}}{{/link-to}}</td>
23+
<td>{{format-hashrate m.hr}}</td>
24+
<td>{{format-date-locale m.lastBeat}}</td>
25+
</tr>
26+
{{/each}}
27+
</tbody>
28+
</table>
29+
</div>
2830
{{else}}
2931
<h3>No miners</h3>
3032
{{/if}}

www/app/templates/payments.hbs

Lines changed: 24 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,32 @@
77
<div class="container">
88
{{#if model.payments}}
99
<h4>Latest Payouts</h4>
10-
<table class="table table-condensed table-striped">
11-
<thead>
12-
<tr>
13-
<th>Time</th>
14-
<th>Amount</th>
15-
<th>Address</th>
16-
<th>Tx ID</th>
17-
</tr>
18-
</thead>
19-
<tbody>
20-
{{#each model.payments as |tx|}}
10+
<div class="table-responsive">
11+
<table class="table table-condensed table-striped">
12+
<thead>
2113
<tr>
22-
<td>{{format-date-locale tx.timestamp}}</td>
23-
<td>{{format-number tx.formatAmount}}</td>
24-
<td>
25-
<a href="https://etherscan.io/address/{{tx.address}}" class="hash" rel="nofollow" target="_blank">{{tx.address}}</a>
26-
</td>
27-
<td>
28-
<a href="https://etherscan.io/tx/{{tx.tx}}" class="hash" rel="nofollow" target="_blank">{{format-tx tx.tx}}</a>
29-
</td>
14+
<th>Time</th>
15+
<th>Amount</th>
16+
<th>Address</th>
17+
<th>Tx ID</th>
3018
</tr>
31-
{{/each}}
32-
</tbody>
33-
</table>
19+
</thead>
20+
<tbody>
21+
{{#each model.payments as |tx|}}
22+
<tr>
23+
<td>{{format-date-locale tx.timestamp}}</td>
24+
<td>{{format-number tx.formatAmount}}</td>
25+
<td>
26+
<a href="https://etherscan.io/address/{{tx.address}}" class="hash" rel="nofollow" target="_blank">{{tx.address}}</a>
27+
</td>
28+
<td>
29+
<a href="https://etherscan.io/tx/{{tx.tx}}" class="hash" rel="nofollow" target="_blank">{{format-tx tx.tx}}</a>
30+
</td>
31+
</tr>
32+
{{/each}}
33+
</tbody>
34+
</table>
35+
</div>
3436
{{else}}
3537
<h3>No payouts yet</h3>
3638
{{/if}}

0 commit comments

Comments
 (0)