Fixing routes to /tv and /status
This commit is contained in:
parent
f5260b72e5
commit
2ebdb27dcb
@ -58,173 +58,133 @@ const routes: Routes = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'liquid',
|
path: 'liquid',
|
||||||
component: MasterPageComponent,
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: StartComponent,
|
component: MasterPageComponent,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: LatestBlocksComponent
|
component: StartComponent,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: LatestBlocksComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'tx/:id',
|
||||||
|
component: TransactionComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'block/:id',
|
||||||
|
component: BlockComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'mempool-block/:id',
|
||||||
|
component: MempoolBlockComponent
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tx/:id',
|
path: 'graphs',
|
||||||
component: TransactionComponent
|
component: StatisticsComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'block/:id',
|
path: 'about',
|
||||||
component: BlockComponent
|
component: AboutComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'mempool-block/:id',
|
path: 'address/:id',
|
||||||
component: MempoolBlockComponent
|
component: AddressComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'asset/:id',
|
||||||
|
component: AssetComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'assets',
|
||||||
|
component: AssetsComponent,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'graphs',
|
|
||||||
component: StatisticsComponent,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'tv',
|
path: 'tv',
|
||||||
component: TelevisionComponent,
|
component: TelevisionComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'about',
|
path: 'status',
|
||||||
component: AboutComponent,
|
component: StatusViewComponent
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'address/:id',
|
|
||||||
children: [],
|
|
||||||
component: AddressComponent
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '**',
|
path: '**',
|
||||||
redirectTo: ''
|
redirectTo: ''
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'liquid',
|
|
||||||
component: MasterPageComponent,
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
component: StartComponent,
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
component: LatestBlocksComponent
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'tx/:id',
|
|
||||||
component: TransactionComponent
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'block/:id',
|
|
||||||
component: BlockComponent
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'mempool-block/:id',
|
|
||||||
component: MempoolBlockComponent
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'graphs',
|
|
||||||
component: StatisticsComponent,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'about',
|
|
||||||
component: AboutComponent,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'address/:id',
|
|
||||||
children: [],
|
|
||||||
component: AddressComponent
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'asset/:id',
|
|
||||||
component: AssetComponent
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'assets',
|
|
||||||
component: AssetsComponent,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '**',
|
|
||||||
redirectTo: ''
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'testnet',
|
path: 'testnet',
|
||||||
component: MasterPageComponent,
|
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: StartComponent,
|
component: MasterPageComponent,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '',
|
path: '',
|
||||||
component: LatestBlocksComponent
|
component: StartComponent,
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
path: '',
|
||||||
|
component: LatestBlocksComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'tx/:id',
|
||||||
|
component: TransactionComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'block/:id',
|
||||||
|
component: BlockComponent
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: 'mempool-block/:id',
|
||||||
|
component: MempoolBlockComponent
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tx/:id',
|
path: 'graphs',
|
||||||
component: TransactionComponent
|
component: StatisticsComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'block/:id',
|
path: 'about',
|
||||||
component: BlockComponent
|
component: AboutComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'mempool-block/:id',
|
path: 'address/:id',
|
||||||
component: MempoolBlockComponent
|
children: [],
|
||||||
|
component: AddressComponent
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'graphs',
|
path: 'tv',
|
||||||
component: StatisticsComponent,
|
component: TelevisionComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'about',
|
path: 'status',
|
||||||
component: AboutComponent,
|
component: StatusViewComponent
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'address/:id',
|
|
||||||
children: [],
|
|
||||||
component: AddressComponent
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '**',
|
path: '**',
|
||||||
redirectTo: ''
|
redirectTo: ''
|
||||||
},
|
},
|
||||||
],
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'tv',
|
path: 'tv',
|
||||||
component: TelevisionComponent,
|
component: TelevisionComponent,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: 'liquid-tv',
|
path: 'status',
|
||||||
component: TelevisionComponent,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'testnet-tv',
|
|
||||||
component: TelevisionComponent,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'status-view',
|
|
||||||
component: StatusViewComponent
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'liquid-status-view',
|
|
||||||
component: StatusViewComponent
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: 'testnet-status-view',
|
|
||||||
component: StatusViewComponent
|
component: StatusViewComponent
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
<a class="nav-link" [routerLink]="['/graphs' | relativeUrl]" (click)="collapse()">Graphs</a>
|
<a class="nav-link" [routerLink]="['/graphs' | relativeUrl]" (click)="collapse()">Graphs</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" routerLinkActive="active">
|
<li class="nav-item" routerLinkActive="active">
|
||||||
<a class="nav-link" [routerLink]="[tvViewRoute]" (click)="collapse()">TV view <img src="./resources/expand.png" width="15"/></a>
|
<a class="nav-link" [routerLink]="['/tv' | relativeUrl]" (click)="collapse()">TV view <img src="./resources/expand.png" width="15"/></a>
|
||||||
</li>
|
</li>
|
||||||
<li *ngIf="network === 'liquid'" class="nav-item" routerLinkActive="active">
|
<li *ngIf="network === 'liquid'" class="nav-item" routerLinkActive="active">
|
||||||
<a class="nav-link" [routerLink]="['/assets' | relativeUrl]" (click)="collapse()">Assets</a>
|
<a class="nav-link" [routerLink]="['/assets' | relativeUrl]" (click)="collapse()">Assets</a>
|
||||||
|
@ -53,16 +53,12 @@ export class StateService {
|
|||||||
setNetworkBasedonUrl(url: string) {
|
setNetworkBasedonUrl(url: string) {
|
||||||
switch (url.split('/')[1]) {
|
switch (url.split('/')[1]) {
|
||||||
case 'liquid':
|
case 'liquid':
|
||||||
case 'liquid-tv':
|
|
||||||
case 'liquid-status-view':
|
|
||||||
if (this.network !== 'liquid') {
|
if (this.network !== 'liquid') {
|
||||||
this.network = 'liquid';
|
this.network = 'liquid';
|
||||||
this.networkChanged$.next('liquid');
|
this.networkChanged$.next('liquid');
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case 'testnet':
|
case 'testnet':
|
||||||
case 'testnet-tv':
|
|
||||||
case 'testnet-status-view':
|
|
||||||
if (this.network !== 'testnet') {
|
if (this.network !== 'testnet') {
|
||||||
this.network = 'testnet';
|
this.network = 'testnet';
|
||||||
this.networkChanged$.next('testnet');
|
this.networkChanged$.next('testnet');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user