diff --git a/frontend/src/app/app-routing.module.ts b/frontend/src/app/app-routing.module.ts index 1ef7e5fe0..4541a0a25 100644 --- a/frontend/src/app/app-routing.module.ts +++ b/frontend/src/app/app-routing.module.ts @@ -31,6 +31,7 @@ import { MiningDashboardComponent } from './components/mining-dashboard/mining-d import { HashrateChartComponent } from './components/hashrate-chart/hashrate-chart.component'; import { HashrateChartPoolsComponent } from './components/hashrates-chart-pools/hashrate-chart-pools.component'; import { MiningStartComponent } from './components/mining-start/mining-start.component'; +import { GraphsComponent } from './components/graphs/graphs.component'; import { BlocksList } from './components/blocks-list/blocks-list.component'; let routes: Routes = [ @@ -80,18 +81,6 @@ let routes: Routes = [ path: 'blocks', component: BlocksList, }, - { - path: 'hashrate', - component: HashrateChartComponent, - }, - { - path: 'hashrate/pools', - component: HashrateChartPoolsComponent, - }, - { - path: 'pools', - component: PoolRankingComponent, - }, { path: 'pool', children: [ @@ -105,7 +94,30 @@ let routes: Routes = [ }, { path: 'graphs', - component: StatisticsComponent, + component: GraphsComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'mempool', + }, + { + path: 'mempool', + component: StatisticsComponent, + }, + { + path: 'mining/hashrate-difficulty', + component: HashrateChartComponent, + }, + { + path: 'mining/pools-dominance', + component: HashrateChartPoolsComponent, + }, + { + path: 'mining/pools', + component: PoolRankingComponent, + }, + ], }, { path: 'about', @@ -224,7 +236,30 @@ let routes: Routes = [ }, { path: 'graphs', - component: StatisticsComponent, + component: GraphsComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'mempool', + }, + { + path: 'mempool', + component: StatisticsComponent, + }, + { + path: 'mining/hashrate-difficulty', + component: HashrateChartComponent, + }, + { + path: 'mining/pools-dominance', + component: HashrateChartPoolsComponent, + }, + { + path: 'mining/pools', + component: PoolRankingComponent, + }, + ] }, { path: 'address/:id', @@ -337,7 +372,30 @@ let routes: Routes = [ }, { path: 'graphs', - component: StatisticsComponent, + component: GraphsComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'mempool', + }, + { + path: 'mempool', + component: StatisticsComponent, + }, + { + path: 'mining/hashrate-difficulty', + component: HashrateChartComponent, + }, + { + path: 'mining/pools-dominance', + component: HashrateChartPoolsComponent, + }, + { + path: 'mining/pools', + component: PoolRankingComponent, + }, + ] }, { path: 'address/:id', @@ -439,7 +497,30 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') { }, { path: 'graphs', - component: StatisticsComponent, + component: GraphsComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'mempool', + }, + { + path: 'mempool', + component: StatisticsComponent, + }, + { + path: 'mining/hashrate-difficulty', + component: HashrateChartComponent, + }, + { + path: 'mining/pools-dominance', + component: HashrateChartPoolsComponent, + }, + { + path: 'mining/pools', + component: PoolRankingComponent, + }, + ] }, { path: 'address/:id', @@ -548,7 +629,30 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') { }, { path: 'graphs', - component: StatisticsComponent, + component: GraphsComponent, + children: [ + { + path: '', + pathMatch: 'full', + redirectTo: 'mempool', + }, + { + path: 'mempool', + component: StatisticsComponent, + }, + { + path: 'mining/hashrate-difficulty', + component: HashrateChartComponent, + }, + { + path: 'mining/pools-dominance', + component: HashrateChartPoolsComponent, + }, + { + path: 'mining/pools', + component: PoolRankingComponent, + }, + ] }, { path: 'address/:id', diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts index 3affdc7ba..99917815c 100644 --- a/frontend/src/app/app.module.ts +++ b/frontend/src/app/app.module.ts @@ -75,6 +75,7 @@ import { HashrateChartPoolsComponent } from './components/hashrates-chart-pools/ import { MiningStartComponent } from './components/mining-start/mining-start.component'; import { AmountShortenerPipe } from './shared/pipes/amount-shortener.pipe'; import { ShortenStringPipe } from './shared/pipes/shorten-string-pipe/shorten-string.pipe'; +import { GraphsComponent } from './components/graphs/graphs.component'; import { DifficultyAdjustmentsTable } from './components/difficulty-adjustments-table/difficulty-adjustments-table.components'; import { BlocksList } from './components/blocks-list/blocks-list.component'; @@ -133,6 +134,7 @@ import { BlocksList } from './components/blocks-list/blocks-list.component'; HashrateChartPoolsComponent, MiningStartComponent, AmountShortenerPipe, + GraphsComponent, DifficultyAdjustmentsTable, BlocksList, ], diff --git a/frontend/src/app/components/graphs/graphs.component.html b/frontend/src/app/components/graphs/graphs.component.html new file mode 100644 index 000000000..3a5b3ec73 --- /dev/null +++ b/frontend/src/app/components/graphs/graphs.component.html @@ -0,0 +1,25 @@ + + + \ No newline at end of file diff --git a/frontend/src/app/components/graphs/graphs.component.scss b/frontend/src/app/components/graphs/graphs.component.scss new file mode 100644 index 000000000..c4ca483bd --- /dev/null +++ b/frontend/src/app/components/graphs/graphs.component.scss @@ -0,0 +1,9 @@ +.menu { + flex-grow: 1; + max-width: 600px; +} + +.menu-li { + flex-grow: 1; + text-align: center; +} diff --git a/frontend/src/app/components/graphs/graphs.component.ts b/frontend/src/app/components/graphs/graphs.component.ts new file mode 100644 index 000000000..61fa65196 --- /dev/null +++ b/frontend/src/app/components/graphs/graphs.component.ts @@ -0,0 +1,14 @@ +import { Component, OnInit } from "@angular/core"; + +@Component({ + selector: 'app-graphs', + templateUrl: './graphs.component.html', + styleUrls: ['./graphs.component.scss'], +}) +export class GraphsComponent implements OnInit { + constructor() { } + + ngOnInit(): void { + + } +} diff --git a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html index 2ca0e8376..e4bbfa298 100644 --- a/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html +++ b/frontend/src/app/components/hashrate-chart/hashrate-chart.component.html @@ -1,6 +1,7 @@
+ Hashrate & Difficulty