diff --git a/frontend/src/app/components/docs/docs.component.html b/frontend/src/app/components/docs/docs.component.html index 61d127c9c..92aef1d34 100644 --- a/frontend/src/app/components/docs/docs.component.html +++ b/frontend/src/app/components/docs/docs.component.html @@ -14,7 +14,7 @@ -
  • +
  • API - WebSocket diff --git a/frontend/src/app/components/docs/docs.component.ts b/frontend/src/app/components/docs/docs.component.ts index 4957cf67f..ca2f0a8b4 100644 --- a/frontend/src/app/components/docs/docs.component.ts +++ b/frontend/src/app/components/docs/docs.component.ts @@ -1,5 +1,6 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute } from '@angular/router'; +import { Env, StateService } from 'src/app/services/state.service'; @Component({ selector: 'app-docs', @@ -9,13 +10,18 @@ import { ActivatedRoute } from '@angular/router'; export class DocsComponent implements OnInit { activeTab = 0; + env: Env; + showWebSocketTab = true; constructor( private route: ActivatedRoute, + private stateService: StateService, ) { } ngOnInit(): void { const url = this.route.snapshot.url; this.activeTab = ( url[2].path === "rest" ) ? 0 : 1; + this.env = this.stateService.env; + this.showWebSocketTab = ( ! ( ( this.env.BASE_MODULE === "bisq" ) || ( this.stateService.network === "bisq" ) ) ); } }