Exclude websocket tab on bisq
This commit is contained in:
parent
f0be19409f
commit
ff148f15c4
@ -14,7 +14,7 @@
|
|||||||
</ng-template>
|
</ng-template>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li [ngbNavItem]="1">
|
<li [ngbNavItem]="1" *ngIf="showWebSocketTab">
|
||||||
<a ngbNavLink routerLink="../websocket">API - WebSocket</a>
|
<a ngbNavLink routerLink="../websocket">API - WebSocket</a>
|
||||||
<ng-template ngbNavContent>
|
<ng-template ngbNavContent>
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
|
import { Env, StateService } from 'src/app/services/state.service';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-docs',
|
selector: 'app-docs',
|
||||||
@ -9,13 +10,18 @@ import { ActivatedRoute } from '@angular/router';
|
|||||||
export class DocsComponent implements OnInit {
|
export class DocsComponent implements OnInit {
|
||||||
|
|
||||||
activeTab = 0;
|
activeTab = 0;
|
||||||
|
env: Env;
|
||||||
|
showWebSocketTab = true;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
|
private stateService: StateService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
const url = this.route.snapshot.url;
|
const url = this.route.snapshot.url;
|
||||||
this.activeTab = ( url[2].path === "rest" ) ? 0 : 1;
|
this.activeTab = ( url[2].path === "rest" ) ? 0 : 1;
|
||||||
|
this.env = this.stateService.env;
|
||||||
|
this.showWebSocketTab = ( ! ( ( this.env.BASE_MODULE === "bisq" ) || ( this.stateService.network === "bisq" ) ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user