Explicitly set mining and lightning preview images

This commit is contained in:
hunicus 2024-03-10 11:10:24 +09:00
parent b41f196421
commit a5f864fe35
No known key found for this signature in database
GPG Key ID: 24837C51B6D81FD9
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import { AfterViewInit, ChangeDetectionStrategy, Component, HostListener, OnInit } from '@angular/core'; import { AfterViewInit, ChangeDetectionStrategy, Component, HostListener, OnInit } from '@angular/core';
import { SeoService } from '../../services/seo.service'; import { SeoService } from '../../services/seo.service';
import { OpenGraphService } from '../../services/opengraph.service';
import { WebsocketService } from '../../services/websocket.service'; import { WebsocketService } from '../../services/websocket.service';
import { StateService } from '../../services/state.service'; import { StateService } from '../../services/state.service';
import { EventType, NavigationStart, Router } from '@angular/router'; import { EventType, NavigationStart, Router } from '@angular/router';
@ -15,12 +16,14 @@ export class MiningDashboardComponent implements OnInit, AfterViewInit {
constructor( constructor(
private seoService: SeoService, private seoService: SeoService,
private ogService: OpenGraphService,
private websocketService: WebsocketService, private websocketService: WebsocketService,
private stateService: StateService, private stateService: StateService,
private router: Router private router: Router
) { ) {
this.seoService.setTitle($localize`:@@a681a4e2011bb28157689dbaa387de0dd0aa0c11:Mining Dashboard`); this.seoService.setTitle($localize`:@@a681a4e2011bb28157689dbaa387de0dd0aa0c11:Mining Dashboard`);
this.seoService.setDescription($localize`:@@meta.description.mining.dashboard:Get real-time Bitcoin mining stats like hashrate, difficulty adjustment, block rewards, pool dominance, and more.`); this.seoService.setDescription($localize`:@@meta.description.mining.dashboard:Get real-time Bitcoin mining stats like hashrate, difficulty adjustment, block rewards, pool dominance, and more.`);
this.ogService.setManualOgImage('mining.jpg');
} }
ngOnInit(): void { ngOnInit(): void {

View File

@ -3,6 +3,7 @@ import { Observable } from 'rxjs';
import { share } from 'rxjs/operators'; import { share } from 'rxjs/operators';
import { INodesRanking, INodesStatistics } from '../../interfaces/node-api.interface'; import { INodesRanking, INodesStatistics } from '../../interfaces/node-api.interface';
import { SeoService } from '../../services/seo.service'; import { SeoService } from '../../services/seo.service';
import { OpenGraphService } from '../../services/opengraph.service';
import { StateService } from '../../services/state.service'; import { StateService } from '../../services/state.service';
import { LightningApiService } from '../lightning-api.service'; import { LightningApiService } from '../lightning-api.service';
@ -21,6 +22,7 @@ export class LightningDashboardComponent implements OnInit, AfterViewInit {
constructor( constructor(
private lightningApiService: LightningApiService, private lightningApiService: LightningApiService,
private seoService: SeoService, private seoService: SeoService,
private ogService: OpenGraphService,
private stateService: StateService, private stateService: StateService,
) { } ) { }
@ -29,6 +31,7 @@ export class LightningDashboardComponent implements OnInit, AfterViewInit {
this.seoService.setTitle($localize`:@@142e923d3b04186ac6ba23387265d22a2fa404e0:Lightning Explorer`); this.seoService.setTitle($localize`:@@142e923d3b04186ac6ba23387265d22a2fa404e0:Lightning Explorer`);
this.seoService.setDescription($localize`:@@meta.description.lightning.dashboard:Get stats on the Lightning network (aggregate capacity, connectivity, etc), Lightning nodes (channels, liquidity, etc) and Lightning channels (status, fees, etc).`); this.seoService.setDescription($localize`:@@meta.description.lightning.dashboard:Get stats on the Lightning network (aggregate capacity, connectivity, etc), Lightning nodes (channels, liquidity, etc) and Lightning channels (status, fees, etc).`);
this.ogService.setManualOgImage('lightning.jpg');
this.nodesRanking$ = this.lightningApiService.getNodesRanking$().pipe(share()); this.nodesRanking$ = this.lightningApiService.getNodesRanking$().pipe(share());
this.statistics$ = this.lightningApiService.getLatestStatistics$().pipe(share()); this.statistics$ = this.lightningApiService.getLatestStatistics$().pipe(share());