diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts
index b60f66a1e..f0aa73e3d 100644
--- a/frontend/src/app/app-routing.module.ts
+++ b/frontend/src/app/app-routing.module.ts
@@ -59,6 +59,10 @@ let routes: Routes = [
path: 'mempool-block/:id',
component: MempoolBlockComponent
},
+ {
+ path: 'mining',
+ component: MiningDashboardComponent,
+ },
],
},
{
@@ -73,10 +77,6 @@ let routes: Routes = [
path: 'mining/pools',
component: PoolRankingComponent,
},
- {
- path: 'mining',
- component: MiningDashboardComponent,
- },
{
path: 'mining/pool/:poolId',
component: PoolComponent,
@@ -159,6 +159,10 @@ let routes: Routes = [
path: 'mempool-block/:id',
component: MempoolBlockComponent
},
+ {
+ path: 'mining',
+ component: MiningDashboardComponent,
+ },
],
},
{
@@ -173,10 +177,6 @@ let routes: Routes = [
path: 'mining/pools',
component: PoolRankingComponent,
},
- {
- path: 'mining',
- component: MiningDashboardComponent,
- },
{
path: 'mining/pool/:poolId',
component: PoolComponent,
@@ -253,6 +253,10 @@ let routes: Routes = [
path: 'mempool-block/:id',
component: MempoolBlockComponent
},
+ {
+ path: 'mining',
+ component: MiningDashboardComponent,
+ },
],
},
{
@@ -267,10 +271,6 @@ let routes: Routes = [
path: 'mining/pools',
component: PoolRankingComponent,
},
- {
- path: 'mining',
- component: MiningDashboardComponent,
- },
{
path: 'mining/pool/:poolId',
component: PoolComponent,
diff --git a/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.html b/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.html
index c8a4aa953..1914b5d08 100644
--- a/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.html
+++ b/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.html
@@ -21,7 +21,7 @@
-
+
diff --git a/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts b/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts
index f80134425..a8d055602 100644
--- a/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts
+++ b/frontend/src/app/components/blockchain-blocks/blockchain-blocks.component.ts
@@ -12,7 +12,7 @@ import { BlockExtended } from 'src/app/interfaces/node-api.interface';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class BlockchainBlocksComponent implements OnInit, OnDestroy {
- @Input() miningInfo: boolean = false;
+ @Input() showMiningInfo: boolean = false;
specialBlocks = specialBlocks;
network = '';
blocks: BlockExtended[] = [];
diff --git a/frontend/src/app/components/blockchain/blockchain.component.html b/frontend/src/app/components/blockchain/blockchain.component.html
index 5607b630b..19ee5676d 100644
--- a/frontend/src/app/components/blockchain/blockchain.component.html
+++ b/frontend/src/app/components/blockchain/blockchain.component.html
@@ -1,8 +1,8 @@
-
+
diff --git a/frontend/src/app/components/blockchain/blockchain.component.ts b/frontend/src/app/components/blockchain/blockchain.component.ts
index 10c9be309..b47eee833 100644
--- a/frontend/src/app/components/blockchain/blockchain.component.ts
+++ b/frontend/src/app/components/blockchain/blockchain.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, ChangeDetectionStrategy, Input, ViewChild, ElementRef } from '@angular/core';
+import { Component, OnInit, ChangeDetectionStrategy } from '@angular/core';
import { StateService } from 'src/app/services/state.service';
@Component({
@@ -8,8 +8,7 @@ import { StateService } from 'src/app/services/state.service';
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class BlockchainComponent implements OnInit {
- @Input() miningInfo: boolean = false;
- @ViewChild('container') container: ElementRef;
+ showMiningInfo: boolean = false;
network: string;
constructor(
@@ -18,15 +17,5 @@ export class BlockchainComponent implements OnInit {
ngOnInit() {
this.network = this.stateService.network;
-
- setTimeout(() => {
- if (this.miningInfo) {
- this.container.nativeElement.className += ' move-left';
- this.stateService.blockShifted = true;
- } else if (this.stateService.blockShifted) {
- this.container.nativeElement.className = this.container.nativeElement.className.replace(' move-left', '');
- this.stateService.blockShifted = false;
- }
- }, 250);
}
}
diff --git a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html
index d3ca36060..53ca1e118 100644
--- a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html
+++ b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.html
@@ -1,11 +1,5 @@
-
-
-
diff --git a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.ts b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.ts
index 1b4b137de..3dc139b43 100644
--- a/frontend/src/app/components/mining-dashboard/mining-dashboard.component.ts
+++ b/frontend/src/app/components/mining-dashboard/mining-dashboard.component.ts
@@ -1,9 +1,10 @@
-import { Component, OnInit } from '@angular/core';
+import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
@Component({
selector: 'app-mining-dashboard',
templateUrl: './mining-dashboard.component.html',
- styleUrls: ['./mining-dashboard.component.scss']
+ styleUrls: ['./mining-dashboard.component.scss'],
+ changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MiningDashboardComponent implements OnInit {
diff --git a/frontend/src/app/services/state.service.ts b/frontend/src/app/services/state.service.ts
index 1b2b9833c..14d67e765 100644
--- a/frontend/src/app/services/state.service.ts
+++ b/frontend/src/app/services/state.service.ts
@@ -100,7 +100,6 @@ export class StateService {
keyNavigation$ = new Subject
();
blockScrolling$: Subject = new Subject();
- public blockShifted: boolean = false;
constructor(
@Inject(PLATFORM_ID) private platformId: any,