Bisq markets: Titles
This commit is contained in:
parent
146fcfc16d
commit
8e29a4cefd
@ -1,5 +1,5 @@
|
|||||||
<div class="container-xl">
|
<div class="container-xl">
|
||||||
<h1>Active Markets</h1>
|
<h1>Markets</h1>
|
||||||
<ng-container *ngIf="{ value: (tickers$ | async) } as tickers">
|
<ng-container *ngIf="{ value: (tickers$ | async) } as tickers">
|
||||||
|
|
||||||
<table class="table table-borderless table-striped">
|
<table class="table table-borderless table-striped">
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
|
||||||
import { Observable, combineLatest } from 'rxjs';
|
import { Observable, combineLatest } from 'rxjs';
|
||||||
import { filter, map } from 'rxjs/operators';
|
import { filter, map } from 'rxjs/operators';
|
||||||
|
import { SeoService } from 'src/app/services/seo.service';
|
||||||
import { StateService } from 'src/app/services/state.service';
|
import { StateService } from 'src/app/services/state.service';
|
||||||
import { WebsocketService } from 'src/app/services/websocket.service';
|
import { WebsocketService } from 'src/app/services/websocket.service';
|
||||||
import { BisqApiService } from '../bisq-api.service';
|
import { BisqApiService } from '../bisq-api.service';
|
||||||
@ -19,9 +20,11 @@ export class BisqDashboardComponent implements OnInit {
|
|||||||
private websocketService: WebsocketService,
|
private websocketService: WebsocketService,
|
||||||
private bisqApiService: BisqApiService,
|
private bisqApiService: BisqApiService,
|
||||||
private stateService: StateService,
|
private stateService: StateService,
|
||||||
|
private seoService: SeoService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
|
this.seoService.setTitle(`Markets`);
|
||||||
this.websocketService.want(['blocks']);
|
this.websocketService.want(['blocks']);
|
||||||
|
|
||||||
this.tickers$ = combineLatest([
|
this.tickers$ = combineLatest([
|
||||||
|
@ -3,6 +3,7 @@ import { FormBuilder, FormGroup } from '@angular/forms';
|
|||||||
import { ActivatedRoute } from '@angular/router';
|
import { ActivatedRoute } from '@angular/router';
|
||||||
import { combineLatest, merge, Observable, of } from 'rxjs';
|
import { combineLatest, merge, Observable, of } from 'rxjs';
|
||||||
import { map, switchMap } from 'rxjs/operators';
|
import { map, switchMap } from 'rxjs/operators';
|
||||||
|
import { SeoService } from 'src/app/services/seo.service';
|
||||||
import { WebsocketService } from 'src/app/services/websocket.service';
|
import { WebsocketService } from 'src/app/services/websocket.service';
|
||||||
import { BisqApiService } from '../bisq-api.service';
|
import { BisqApiService } from '../bisq-api.service';
|
||||||
|
|
||||||
@ -25,6 +26,7 @@ export class BisqMarketComponent implements OnInit, OnDestroy {
|
|||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private bisqApiService: BisqApiService,
|
private bisqApiService: BisqApiService,
|
||||||
private formBuilder: FormBuilder,
|
private formBuilder: FormBuilder,
|
||||||
|
private seoService: SeoService,
|
||||||
) { }
|
) { }
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
@ -37,8 +39,11 @@ export class BisqMarketComponent implements OnInit, OnDestroy {
|
|||||||
switchMap((markets) => combineLatest([of(markets), this.route.paramMap])),
|
switchMap((markets) => combineLatest([of(markets), this.route.paramMap])),
|
||||||
map(([markets, routeParams]) => {
|
map(([markets, routeParams]) => {
|
||||||
const pair = routeParams.get('pair');
|
const pair = routeParams.get('pair');
|
||||||
|
const pairUpperCase = pair.replace('_', '/').toUpperCase();
|
||||||
|
this.seoService.setTitle(`Bisq market: ${pairUpperCase}`);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
pair: pair.replace('_', '/').toUpperCase(),
|
pair: pairUpperCase,
|
||||||
market: markets[pair],
|
market: markets[pair],
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user