2020-10-07 18:24:01 +02:00
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
|
import { StateService } from 'src/app/services/state.service';
|
2020-10-08 12:51:10 +02:00
|
|
|
import { WebsocketService } from 'src/app/services/websocket.service';
|
2020-10-07 18:24:01 +02:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
selector: 'app-api-docs',
|
|
|
|
templateUrl: './api-docs.component.html',
|
|
|
|
styleUrls: ['./api-docs.component.scss']
|
|
|
|
})
|
|
|
|
export class ApiDocsComponent implements OnInit {
|
|
|
|
hostname = document.location.hostname;
|
|
|
|
active = 1;
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
private stateService: StateService,
|
2020-10-08 12:51:10 +02:00
|
|
|
private websocketService: WebsocketService,
|
2020-10-07 18:24:01 +02:00
|
|
|
) { }
|
|
|
|
|
|
|
|
ngOnInit(): void {
|
2020-10-08 12:51:10 +02:00
|
|
|
this.websocketService.want(['blocks']);
|
|
|
|
|
2020-10-07 18:24:01 +02:00
|
|
|
if (this.stateService.network === 'bisq') {
|
|
|
|
this.active = 2;
|
|
|
|
}
|
|
|
|
if (document.location.port !== '') {
|
|
|
|
this.hostname = this.hostname + ':' + document.location.port;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|