Node and Channel pages improvements

This commit is contained in:
softsimon
2022-05-15 19:22:14 +04:00
parent 179f959f0f
commit e12f32ef80
16 changed files with 239 additions and 185 deletions

View File

@@ -2,6 +2,7 @@ import { ChangeDetectionStrategy, Component, OnInit } from '@angular/core';
import { ActivatedRoute, ParamMap } from '@angular/router';
import { Observable } from 'rxjs';
import { map, switchMap } from 'rxjs/operators';
import { SeoService } from 'src/app/services/seo.service';
import { LightningApiService } from '../lightning-api.service';
@Component({
@@ -20,6 +21,7 @@ export class NodeComponent implements OnInit {
constructor(
private lightningApiService: LightningApiService,
private activatedRoute: ActivatedRoute,
private seoService: SeoService,
) { }
ngOnInit(): void {
@@ -29,6 +31,8 @@ export class NodeComponent implements OnInit {
return this.lightningApiService.getNode$(params.get('public_key'));
}),
map((node) => {
this.seoService.setTitle(`Node: ${node.alias}`);
const socketsObject = [];
for (const socket of node.sockets.split(',')) {
if (socket === '') {