[faucet] only enable on mempool.space instance
This commit is contained in:
parent
9e844ffbbd
commit
83f3d07538
@ -102,7 +102,7 @@
|
|||||||
<li class="nav-item" routerLinkActive="active" id="btn-graphs">
|
<li class="nav-item" routerLinkActive="active" id="btn-graphs">
|
||||||
<a class="nav-link" [routerLink]="['/graphs' | relativeUrl]" (click)="collapse()"><fa-icon [icon]="['fas', 'chart-area']" [fixedWidth]="true" i18n-title="master-page.graphs" title="Graphs"></fa-icon></a>
|
<a class="nav-link" [routerLink]="['/graphs' | relativeUrl]" (click)="collapse()"><fa-icon [icon]="['fas', 'chart-area']" [fixedWidth]="true" i18n-title="master-page.graphs" title="Graphs"></fa-icon></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" routerLinkActive="active" id="btn-faucet" *ngIf="stateService.env.OFFICIAL_MEMPOOL_SPACE && stateService.network === 'testnet4'">
|
<li class="nav-item" routerLinkActive="active" id="btn-faucet" *ngIf="stateService.isMempoolSpaceBuild && stateService.env.OFFICIAL_MEMPOOL_SPACE && stateService.network === 'testnet4'">
|
||||||
<a class="nav-link" [routerLink]="['/faucet' | relativeUrl]" (click)="collapse()"><fa-icon [icon]="['fas', 'faucet-drip']" [fixedWidth]="true" i18n-title="master-page.faucet" title="Faucet"></fa-icon></a>
|
<a class="nav-link" [routerLink]="['/faucet' | relativeUrl]" (click)="collapse()"><fa-icon [icon]="['fas', 'faucet-drip']" [fixedWidth]="true" i18n-title="master-page.faucet" title="Faucet"></fa-icon></a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item" routerLinkActive="active" id="btn-docs">
|
<li class="nav-item" routerLinkActive="active" id="btn-docs">
|
||||||
|
@ -105,19 +105,21 @@ if (window['__env']?.OFFICIAL_MEMPOOL_SPACE) {
|
|||||||
data: { networks: ['bitcoin', 'liquid'] },
|
data: { networks: ['bitcoin', 'liquid'] },
|
||||||
component: ServerStatusComponent
|
component: ServerStatusComponent
|
||||||
});
|
});
|
||||||
routes[0].children.push({
|
if (window['isMempoolSpaceBuild']) {
|
||||||
path: 'faucet',
|
routes[0].children.push({
|
||||||
canActivate: [(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {
|
path: 'faucet',
|
||||||
return state.url.startsWith('/testnet4/');
|
canActivate: [(route: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {
|
||||||
}],
|
return state.url.startsWith('/testnet4/');
|
||||||
component: StartComponent,
|
}],
|
||||||
data: { preload: true, networkSpecific: true },
|
component: StartComponent,
|
||||||
children: [{
|
data: { preload: true, networkSpecific: true },
|
||||||
path: '',
|
children: [{
|
||||||
data: { networks: ['bitcoin'] },
|
path: '',
|
||||||
component: FaucetComponent,
|
data: { networks: ['bitcoin'] },
|
||||||
}]
|
component: FaucetComponent,
|
||||||
})
|
}]
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user