mirror of
https://github.com/mempool/mempool.git
synced 2024-12-28 01:04:28 +01:00
Add faq tab placeholder
This commit is contained in:
parent
77df0c524c
commit
37e2786c5e
@ -127,6 +127,10 @@ let routes: Routes = [
|
|||||||
path: 'docs/api/:type',
|
path: 'docs/api/:type',
|
||||||
component: DocsComponent
|
component: DocsComponent
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: 'docs/faq',
|
||||||
|
component: DocsComponent
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: 'docs/api',
|
path: 'docs/api',
|
||||||
redirectTo: 'docs/api/rest'
|
redirectTo: 'docs/api/rest'
|
||||||
|
@ -4,9 +4,18 @@
|
|||||||
<h2 i18n="documentation.title">Documentation</h2>
|
<h2 i18n="documentation.title">Documentation</h2>
|
||||||
|
|
||||||
<ul ngbNav #nav="ngbNav" [(activeId)]="activeTab" class="nav-tabs">
|
<ul ngbNav #nav="ngbNav" [(activeId)]="activeTab" class="nav-tabs">
|
||||||
|
|
||||||
|
<li [ngbNavItem]="0" *ngIf="showFaqTab">
|
||||||
|
<a ngbNavLink routerLink="/docs/faq">FAQ</a>
|
||||||
|
<ng-template ngbNavContent>
|
||||||
|
|
||||||
<li [ngbNavItem]="0">
|
<p>FAQ placeholder</p>
|
||||||
<a ngbNavLink routerLink="../rest">API - REST</a>
|
|
||||||
|
</ng-template>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li [ngbNavItem]="1">
|
||||||
|
<a ngbNavLink routerLink="/docs/api/rest">API - REST</a>
|
||||||
<ng-template ngbNavContent>
|
<ng-template ngbNavContent>
|
||||||
|
|
||||||
<app-api-docs [restTabActivated]="true"></app-api-docs>
|
<app-api-docs [restTabActivated]="true"></app-api-docs>
|
||||||
@ -14,8 +23,8 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li [ngbNavItem]="1" *ngIf="showWebSocketTab">
|
<li [ngbNavItem]="2" *ngIf="showWebSocketTab">
|
||||||
<a ngbNavLink routerLink="../websocket">API - WebSocket</a>
|
<a ngbNavLink routerLink="/docs/api/websocket">API - WebSocket</a>
|
||||||
<ng-template ngbNavContent>
|
<ng-template ngbNavContent>
|
||||||
|
|
||||||
<app-api-docs [restTabActivated]="false"></app-api-docs>
|
<app-api-docs [restTabActivated]="false"></app-api-docs>
|
||||||
|
@ -12,6 +12,7 @@ export class DocsComponent implements OnInit {
|
|||||||
activeTab = 0;
|
activeTab = 0;
|
||||||
env: Env;
|
env: Env;
|
||||||
showWebSocketTab = true;
|
showWebSocketTab = true;
|
||||||
|
showFaqTab = true;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
@ -20,8 +21,16 @@ export class DocsComponent implements OnInit {
|
|||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
const url = this.route.snapshot.url;
|
const url = this.route.snapshot.url;
|
||||||
this.activeTab = ( url[2].path === "rest" ) ? 0 : 1;
|
if( url[1].path === "faq" ) {
|
||||||
|
this.activeTab = 0;
|
||||||
|
} else if( url[2].path === "rest" ) {
|
||||||
|
this.activeTab = 1;
|
||||||
|
} else {
|
||||||
|
this.activeTab = 2;
|
||||||
|
}
|
||||||
|
|
||||||
this.env = this.stateService.env;
|
this.env = this.stateService.env;
|
||||||
this.showWebSocketTab = ( ! ( ( this.env.BASE_MODULE === "bisq" ) || ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) );
|
this.showWebSocketTab = ( ! ( ( this.env.BASE_MODULE === "bisq" ) || ( this.stateService.network === "bisq" ) || ( this.stateService.network === "liquidtestnet" ) ) );
|
||||||
|
this.showFaqTab = ( ( this.stateService.network === "" ) || ( this.stateService.network === "signet" ) || ( this.stateService.network === "testnet" ) ) ? true : false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user