diff --git a/web-ui/src/app/components/latest-blocks/latest-blocks.component.css b/web-ui/src/app/components/latest-blocks/latest-blocks.component.css
index e69de29b..4a01dc94 100644
--- a/web-ui/src/app/components/latest-blocks/latest-blocks.component.css
+++ b/web-ui/src/app/components/latest-blocks/latest-blocks.component.css
@@ -0,0 +1,9 @@
+.latest-block {
+ animation: blinker 1s linear;
+}
+
+@keyframes blinker {
+ 50% {
+ background-color: #D4FFD4;
+ }
+}
diff --git a/web-ui/src/app/components/latest-blocks/latest-blocks.component.html b/web-ui/src/app/components/latest-blocks/latest-blocks.component.html
index b68e5269..aa8b691c 100644
--- a/web-ui/src/app/components/latest-blocks/latest-blocks.component.html
+++ b/web-ui/src/app/components/latest-blocks/latest-blocks.component.html
@@ -26,7 +26,7 @@
{{'message.loadingLatestBlocks' | translate}}
-
+
{{item.height}}
|
diff --git a/web-ui/src/app/components/latest-blocks/latest-blocks.component.ts b/web-ui/src/app/components/latest-blocks/latest-blocks.component.ts
index 8e6d1cdf..fbb7858b 100644
--- a/web-ui/src/app/components/latest-blocks/latest-blocks.component.ts
+++ b/web-ui/src/app/components/latest-blocks/latest-blocks.component.ts
@@ -25,7 +25,8 @@ import { ErrorService } from '../../services/error.service';
})
export class LatestBlocksComponent implements OnInit, OnDestroy {
- blocks: Block[];
+ blocks: Block[] = [];
+ private latestBlockHeight = 0;
private subscription$: Subscription;
constructor(
@@ -70,6 +71,7 @@ export class LatestBlocksComponent implements OnInit, OnDestroy {
}
private onBlockRetrieved(response: Block[]) {
+ this.latestBlockHeight = this.blocks.reduce((max, block) => Math.max(block.height, max), 0);
this.blocks = response;
}
@@ -92,4 +94,8 @@ export class LatestBlocksComponent implements OnInit, OnDestroy {
age(block: Block): string {
return '';
}
+
+ isBlockRecent(item: Block): boolean {
+ return item.height > this.latestBlockHeight;
+ }
}