Index asciiScriptSig and display it in /mining/blocks
This commit is contained in:
@@ -24,11 +24,14 @@
|
||||
}}</a>
|
||||
</td>
|
||||
<td class="pool text-left" [class]="widget ? 'widget' : ''">
|
||||
<a class="clear-link" [routerLink]="[('/mining/pool/' + block.extras.pool.id) | relativeUrl]">
|
||||
<img width="25" height="25" src="{{ block.extras.pool['logo'] }}"
|
||||
onError="this.src = './resources/mining-pools/default.svg'">
|
||||
<span class="pool-name">{{ block.extras.pool.name }}</span>
|
||||
</a>
|
||||
<div class="tooltip-custom">
|
||||
<a class="clear-link" [routerLink]="[('/mining/pool/' + block.extras.pool.id) | relativeUrl]">
|
||||
<img width="25" height="25" src="{{ block.extras.pool['logo'] }}"
|
||||
onError="this.src = './resources/mining-pools/default.svg'">
|
||||
<span class="pool-name">{{ block.extras.pool.name }}</span>
|
||||
</a>
|
||||
<span class="tooltiptext">{{ block.extras.coinbaseRaw }}</span>
|
||||
</div>
|
||||
</td>
|
||||
<td class="timestamp" *ngIf="!widget">
|
||||
‎{{ block.timestamp * 1000 | date:'yyyy-MM-dd HH:mm' }}
|
||||
|
||||
@@ -122,3 +122,27 @@ td {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tooltip text */
|
||||
.tooltip-custom {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tooltip-custom .tooltiptext {
|
||||
visibility: hidden;
|
||||
background-color: black;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
padding: 5px 0;
|
||||
border-radius: 6px;
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
// width: 120px;
|
||||
top: -40px;
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* Show the tooltip text when you mouse over the tooltip container */
|
||||
.tooltip-custom:hover .tooltiptext {
|
||||
visibility: visible;
|
||||
}
|
||||
@@ -102,6 +102,7 @@ export interface BlockExtension {
|
||||
feeRange?: number[];
|
||||
reward?: number;
|
||||
coinbaseTx?: Transaction;
|
||||
coinbaseRaw?: string;
|
||||
matchRate?: number;
|
||||
pool?: {
|
||||
id: number;
|
||||
|
||||
@@ -15,7 +15,7 @@ export class Hex2asciiPipe implements PipeTransform {
|
||||
if (!hex) {
|
||||
return '';
|
||||
}
|
||||
let bytes: number[] = [];
|
||||
const bytes: number[] = [];
|
||||
for (let i = 0; i < hex.length; i += 2) {
|
||||
bytes.push(parseInt(hex.substr(i, 2), 16));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user