Merge branch 'origin/HEAD' into natsoni/more-fiat-currencies and fix db version conflicts
This commit is contained in:
@@ -25,7 +25,7 @@ export class OpenGraphService {
|
||||
) {
|
||||
// save og:image tag from original template
|
||||
const initialOgImageTag = metaService.getTag("property='og:image'");
|
||||
this.defaultImageUrl = initialOgImageTag?.content || 'https://mempool.space/resources/mempool-space-preview.png';
|
||||
this.defaultImageUrl = initialOgImageTag?.content || 'https://mempool.space/resources/previews/mempool-space-preview.jpg';
|
||||
this.router.events.pipe(
|
||||
filter(event => event instanceof NavigationEnd),
|
||||
map(() => this.activatedRoute),
|
||||
@@ -53,7 +53,7 @@ export class OpenGraphService {
|
||||
const lang = this.LanguageService.getLanguage();
|
||||
const ogImageUrl = `${window.location.protocol}//${window.location.host}/render/${lang}/preview${this.router.url}`;
|
||||
this.metaService.updateTag({ property: 'og:image', content: ogImageUrl });
|
||||
this.metaService.updateTag({ property: 'twitter:image:src', content: ogImageUrl });
|
||||
this.metaService.updateTag({ name: 'twitter:image', content: ogImageUrl });
|
||||
this.metaService.updateTag({ property: 'og:image:type', content: 'image/png' });
|
||||
this.metaService.updateTag({ property: 'og:image:width', content: '1200' });
|
||||
this.metaService.updateTag({ property: 'og:image:height', content: '600' });
|
||||
@@ -61,12 +61,21 @@ export class OpenGraphService {
|
||||
|
||||
clearOgImage() {
|
||||
this.metaService.updateTag({ property: 'og:image', content: this.defaultImageUrl });
|
||||
this.metaService.updateTag({ property: 'twitter:image:src', content: this.defaultImageUrl });
|
||||
this.metaService.updateTag({ name: 'twitter:image', content: this.defaultImageUrl });
|
||||
this.metaService.updateTag({ property: 'og:image:type', content: 'image/png' });
|
||||
this.metaService.updateTag({ property: 'og:image:width', content: '1000' });
|
||||
this.metaService.updateTag({ property: 'og:image:height', content: '500' });
|
||||
}
|
||||
|
||||
setManualOgImage(imageFilename) {
|
||||
const ogImage = `${window.location.protocol}//${window.location.host}/resources/previews/${imageFilename}`;
|
||||
this.metaService.updateTag({ property: 'og:image', content: ogImage });
|
||||
this.metaService.updateTag({ property: 'og:image:type', content: 'image/jpeg' });
|
||||
this.metaService.updateTag({ property: 'og:image:width', content: '2000' });
|
||||
this.metaService.updateTag({ property: 'og:image:height', content: '1000' });
|
||||
this.metaService.updateTag({ name: 'twitter:image', content: ogImage });
|
||||
}
|
||||
|
||||
/// register an event that needs to resolve before we can take a screenshot
|
||||
waitFor(event) {
|
||||
if (!this.previewLoadingEvents[event]) {
|
||||
|
||||
@@ -39,14 +39,14 @@ export class SeoService {
|
||||
setTitle(newTitle: string): void {
|
||||
this.titleService.setTitle(newTitle + ' - ' + this.getTitle());
|
||||
this.metaService.updateTag({ property: 'og:title', content: newTitle});
|
||||
this.metaService.updateTag({ property: 'twitter:title', content: newTitle});
|
||||
this.metaService.updateTag({ name: 'twitter:title', content: newTitle});
|
||||
this.metaService.updateTag({ property: 'og:meta:ready', content: 'ready'});
|
||||
}
|
||||
|
||||
resetTitle(): void {
|
||||
this.titleService.setTitle(this.getTitle());
|
||||
this.metaService.updateTag({ property: 'og:title', content: this.getTitle()});
|
||||
this.metaService.updateTag({ property: 'twitter:title', content: this.getTitle()});
|
||||
this.metaService.updateTag({ name: 'twitter:title', content: this.getTitle()});
|
||||
this.metaService.updateTag({ property: 'og:meta:ready', content: 'ready'});
|
||||
}
|
||||
|
||||
|
||||
@@ -91,6 +91,7 @@ const defaultEnv: Env = {
|
||||
})
|
||||
export class StateService {
|
||||
isBrowser: boolean = isPlatformBrowser(this.platformId);
|
||||
isMempoolSpaceBuild = window['isMempoolSpaceBuild'] ?? false;
|
||||
network = '';
|
||||
lightning = false;
|
||||
blockVSize: number;
|
||||
|
||||
Reference in New Issue
Block a user