1
- <!-- <small>block:
2
- {{block | json}}</small> -->
3
-
4
- < div class ="card ">
1
+ < div [ngClass] ="{'card': true, 'detail-view': !summary} ">
5
2
< div class ="section header ">
6
3
< div class ="identifiers ">
7
- < div
8
- class ="height "
9
- title ="The height of this block, i.e. its position in the chain. "
10
- >
4
+ < div class ="height " title ="The height of this block, i.e. its position in the chain. ">
11
5
{{block.height}}
12
6
</ div >
13
- < span
14
- *ngIf ="!block.nextBlockHash "
15
- class ="tip-tag "
16
- title ="This is the latest block on the network. "
17
- >
7
+ < span *ngIf ="!block.nextBlockHash " class ="tip-tag " title ="This is the latest block on the network. ">
18
8
Tip
19
9
</ span >
20
10
</ div >
21
- < app-date-time
22
- [value] ="block.timeNormalized "
23
- class ="time "
24
- >
11
+ < app-date-time [value] ="block.timeNormalized " class ="time ">
25
12
</ app-date-time >
26
13
</ div >
27
- < div class ="section body ">
14
+ < app-card-item class ="section ">
28
15
< div class ="property ">
29
- < div class ="key "> Block Hash</ div >
30
- < div class ="value "> {{block.hash}}</ div >
16
+ < span class ="key "> Block Hash</ span >
17
+ < span class ="value "> {{block.hash}}</ span >
31
18
</ div >
32
19
< div class ="property ">
33
20
< span class ="key "> Transaction Count</ span >
34
- < span
35
- class ="value link "
36
- (click) ="listTransactionsInBlock(block) "
37
- >
21
+ < span class ="value link " (click) ="listTransactionsInBlock(block) ">
38
22
{{block.transactionCount}}
39
23
</ span >
40
24
</ div >
41
25
< div class ="property ">
42
- < span class ="key "> Reward </ span >
26
+ < span class ="key "> Block Revenue </ span >
43
27
< span class ="value ">
44
- < app-currency-value
45
- class ="reward "
46
- amount ="{{block.reward}} "
47
- code ="{{block.chain}}_satoshis "
48
- displayAs ="{{displayValueCode}} "
49
- > </ app-currency-value >
28
+ < app-currency-value class ="reward " amount ="{{block.reward}} " code ="{{block.chain}}_satoshis " displayAs ="{{displayValueCode}} "> </ app-currency-value >
50
29
</ span >
51
30
</ div >
52
- </ div >
53
- < div
54
- class ="section details "
55
- *ngIf ="!summary "
56
- >
57
- [show details]
58
- </ div >
59
- </ div >
31
+ < ng-container *ngIf ="!summary ">
32
+ < div class ="property ">
33
+ < span class ="key "> Mining Pool Claim</ span >
34
+ < span class ="value link " (click) ="listBlocksBySameMiner(block) ">
35
+ Unknown
36
+ </ span >
37
+ </ div >
38
+ < div class ="property ">
39
+ < span class ="key "> Block Size</ span >
40
+ < span class ="value "> {{block.size | bytes}}</ span >
41
+ </ div >
42
+ < div class ="property ">
43
+ < span class ="key "> Confirmations</ span >
44
+ < span class ="value "> {{block.confirmations}}</ span >
45
+ </ div >
46
+ </ ng-container >
47
+ </ app-card-item >
48
+ < ng-container *ngIf ="!summary ">
49
+ < app-card-item class ="section " header ="Block Header " type ="expand-collapse " [isOpen] ='true '>
50
+ < table >
51
+ < tr >
52
+ < th > Version</ th >
53
+ < td > {{block.version}}</ td >
54
+ </ tr >
55
+ < tr >
56
+ < th > Previous Block Hash</ th >
57
+ < td > {{block.previousBlockHash}}</ td >
58
+ </ tr >
59
+ < tr >
60
+ < th > Merkle Root</ th >
61
+ < td > {{block.merkleRoot}}</ td >
62
+ </ tr >
63
+ < tr >
64
+ < th > Block Time</ th >
65
+ < td > {{block.time | date:'medium'}}</ td >
66
+ </ tr >
67
+ < tr >
68
+ < th > Bits</ th >
69
+ < td > {{block.bits}}</ td >
70
+ </ tr >
71
+ < tr >
72
+ < th > Nonce</ th >
73
+ < td > {{block.nonce | number}}</ td >
74
+ </ tr >
75
+ </ table >
76
+ </ app-card-item >
77
+ < app-card-item class ="section " header ="Previous Block " headerValue ="{{block.height - 1}} " type ="forward "
78
+ [routerLink] ="['/' + block.chain + '/block/' + block.previousBlockHash] "> </ app-card-item >
79
+ < app-card-item *ngIf ="block.nextBlockHash " class ="section " header ="Next Block " headerValue ="{{block.height + 1}} "
80
+ type ="forward " [routerLink] ="['/' + block.chain + '/block/' + block.nextBlockHash] "> </ app-card-item >
81
+ </ ng-container >
82
+ </ div >
0 commit comments