[LN ISP chart] Only show "Tor node excluded" when appropriate
This commit is contained in:
parent
12eea0e4cc
commit
f30883a018
@ -7,7 +7,9 @@
|
|||||||
<fa-icon [icon]="['fas', 'download']" [fixedWidth]="true"></fa-icon>
|
<fa-icon [icon]="['fas', 'download']" [fixedWidth]="true"></fa-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<small style="color: #ffffff66" i18n="lightning.tor-nodes-excluded">(Tor nodes excluded)</small>
|
<small class="d-block" style="color: #ffffff66; min-height: 25px" i18n="lightning.tor-nodes-excluded">
|
||||||
|
<span *ngIf="!(showTorObservable$ | async)">(Tor nodes excluded)</span>
|
||||||
|
</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container pb-lg-0 bottom-padding">
|
<div class="container pb-lg-0 bottom-padding">
|
||||||
|
@ -28,6 +28,7 @@ export class NodesPerISPChartComponent implements OnInit {
|
|||||||
@HostBinding('attr.dir') dir = 'ltr';
|
@HostBinding('attr.dir') dir = 'ltr';
|
||||||
|
|
||||||
nodesPerAsObservable$: Observable<any>;
|
nodesPerAsObservable$: Observable<any>;
|
||||||
|
showTorObservable$: Observable<boolean>;
|
||||||
groupBySubject = new Subject<boolean>();
|
groupBySubject = new Subject<boolean>();
|
||||||
showTorSubject = new Subject<boolean>();
|
showTorSubject = new Subject<boolean>();
|
||||||
|
|
||||||
@ -44,6 +45,7 @@ export class NodesPerISPChartComponent implements OnInit {
|
|||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.seoService.setTitle($localize`Lightning nodes per ISP`);
|
this.seoService.setTitle($localize`Lightning nodes per ISP`);
|
||||||
|
|
||||||
|
this.showTorObservable$ = this.showTorSubject.asObservable();
|
||||||
this.nodesPerAsObservable$ = combineLatest([this.groupBySubject, this.showTorSubject])
|
this.nodesPerAsObservable$ = combineLatest([this.groupBySubject, this.showTorSubject])
|
||||||
.pipe(
|
.pipe(
|
||||||
switchMap((selectedFilters) => {
|
switchMap((selectedFilters) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user