link to merkle branch first tx
This commit is contained in:
parent
469faf7456
commit
23713a11c2
@ -267,7 +267,11 @@
|
|||||||
<tbody>
|
<tbody>
|
||||||
<tr>
|
<tr>
|
||||||
@for (branch of job.merkleBranches; track $index) {
|
@for (branch of job.merkleBranches; track $index) {
|
||||||
<td class="merkle" [style.background-color]="branch ? '#' + branch.slice(0, 6) : ''"></td>
|
@if ($index === 0 && branch) {
|
||||||
|
<a [routerLink]="['/tx' | relativeUrl, reverseHash(branch)]"><td class="merkle" [style.background-color]="branch ? '#' + branch.slice(0, 6) : ''"><fa-icon [icon]="['fas', 'external-link-alt']" [fixedWidth]="true" style="vertical-align: text-top; font-size: 14px; color: white"></fa-icon></td></a>
|
||||||
|
} @else {
|
||||||
|
<td class="merkle" [style.background-color]="branch ? '#' + branch.slice(0, 6) : ''"></td>
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@for (_ of [].constructor(Math.max(0, 12 - job.merkleBranches.length)); track $index) {
|
@for (_ of [].constructor(Math.max(0, 12 - job.merkleBranches.length)); track $index) {
|
||||||
<td class="merkle empty-branch"></td>
|
<td class="merkle empty-branch"></td>
|
||||||
|
@ -220,6 +220,7 @@ div.scrollable {
|
|||||||
|
|
||||||
.merkle {
|
.merkle {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-branch {
|
.empty-branch {
|
||||||
|
@ -361,6 +361,10 @@ export class PoolComponent implements OnInit {
|
|||||||
return block.height;
|
return block.height;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reverseHash(hash: string) {
|
||||||
|
return hash.match(/../g).reverse().join('');
|
||||||
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.slugSubscription.unsubscribe();
|
this.slugSubscription.unsubscribe();
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,13 @@
|
|||||||
</td>
|
</td>
|
||||||
@for (cell of row.merkleCells; track $index) {
|
@for (cell of row.merkleCells; track $index) {
|
||||||
<td class="merkle" [style.background-color]="cell.hash ? '#' + cell.hash.slice(0, 6) : ''">
|
<td class="merkle" [style.background-color]="cell.hash ? '#' + cell.hash.slice(0, 6) : ''">
|
||||||
<div class="pipe-segment" [class]="pipeToClass(cell.type)"></div>
|
@if ($index === 0 && cell.hash) {
|
||||||
|
<a [routerLink]="['/tx' | relativeUrl, reverseHash(cell.hash)]" class="cell-link">
|
||||||
|
<div class="pipe-segment" [class]="pipeToClass(cell.type)"></div>
|
||||||
|
</a>
|
||||||
|
} @else {
|
||||||
|
<div class="pipe-segment" [class]="pipeToClass(cell.type)"></div>
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
}
|
}
|
||||||
<td class="pool">
|
<td class="pool">
|
||||||
|
@ -92,6 +92,16 @@ td {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cell-link {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge {
|
.badge {
|
||||||
|
@ -196,6 +196,10 @@ export class StratumList implements OnInit, OnDestroy {
|
|||||||
}[type];
|
}[type];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reverseHash(hash: string) {
|
||||||
|
return hash.match(/../g).reverse().join('');
|
||||||
|
}
|
||||||
|
|
||||||
ngOnDestroy(): void {
|
ngOnDestroy(): void {
|
||||||
this.websocketService.stopTrackStratum();
|
this.websocketService.stopTrackStratum();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user