mirror of
https://github.com/mempool/mempool.git
synced 2025-01-18 05:12:35 +01:00
Blink projected halving block.
This commit is contained in:
parent
ba3aba918a
commit
422055046e
@ -1,7 +1,7 @@
|
||||
<div class="mempool-blocks-container">
|
||||
<div class="flashing">
|
||||
<div *ngFor="let projectedBlock of mempoolBlocks; let i = index; trackBy: trackByFn">
|
||||
<div class="bitcoin-block text-center mempool-block" id="mempool-block-{{ i }}" [ngStyle]="getStyleForMempoolBlockAtIndex(i)">
|
||||
<div class="bitcoin-block text-center mempool-block" [class.blink-bg]="blocksLeftToHalving === (i + 1)" id="mempool-block-{{ i }}" [ngStyle]="getStyleForMempoolBlockAtIndex(i)">
|
||||
<a [routerLink]="['/mempool-block/' | relativeUrl, i]" class="blockLink"> </a>
|
||||
<div class="block-body" *ngIf="mempoolBlocks?.length">
|
||||
<div class="fees">
|
||||
|
@ -111,3 +111,21 @@
|
||||
left: 0;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Blinking block
|
||||
|
||||
.blink-bg {
|
||||
color: #fff;
|
||||
animation: blinkingBackground 1s infinite;
|
||||
background: inherit !important;
|
||||
}
|
||||
|
||||
@keyframes blinkingBackground {
|
||||
0% { background-color: #10c018;}
|
||||
25% { background-color: #1056c0;}
|
||||
50% { background-color: #ef0a1a;}
|
||||
75% { background-color: #CFB53B;}
|
||||
100% { background-color: #04a1d5;}
|
||||
}
|
@ -28,12 +28,20 @@ export class MempoolBlocksComponent implements OnInit, OnDestroy {
|
||||
|
||||
resetTransitionTimeout: number;
|
||||
|
||||
blocksLeftToHalving: number;
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private stateService: StateService,
|
||||
) { }
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
this.stateService.blocks$
|
||||
.subscribe((block) => {
|
||||
this.blocksLeftToHalving = 630000 - block.height;
|
||||
});
|
||||
|
||||
this.mempoolBlocksSubscription = this.stateService.mempoolBlocks$
|
||||
.subscribe((blocks) => {
|
||||
const stringifiedBlocks = JSON.stringify(blocks);
|
||||
|
Loading…
Reference in New Issue
Block a user