Subdomain enterprise support

This commit is contained in:
softsimon
2022-07-21 19:58:12 +02:00
parent b52a8c58ab
commit b1b4bdf575
10 changed files with 110 additions and 55 deletions

View File

@@ -7,6 +7,7 @@ import { StateService } from './state.service';
})
export class SeoService {
network = '';
baseTitle = 'mempool';
constructor(
private titleService: Title,
@@ -26,18 +27,23 @@ export class SeoService {
this.metaService.updateTag({ property: 'og:title', content: this.getTitle()});
}
setEnterpriseTitle(title: string) {
this.baseTitle = title + ' - ' + this.baseTitle;
this.resetTitle();
}
getTitle(): string {
if (this.network === 'testnet')
return 'mempool - Bitcoin Testnet';
return this.baseTitle + ' - Bitcoin Testnet';
if (this.network === 'signet')
return 'mempool - Bitcoin Signet';
return this.baseTitle + ' - Bitcoin Signet';
if (this.network === 'liquid')
return 'mempool - Liquid Network';
return this.baseTitle + ' - Liquid Network';
if (this.network === 'liquidtestnet')
return 'mempool - Liquid Testnet';
return this.baseTitle + ' - Liquid Testnet';
if (this.network === 'bisq')
return 'mempool - Bisq Markets';
return 'mempool - ' + (this.network ? this.ucfirst(this.network) : 'Bitcoin') + ' Explorer';
return this.baseTitle + ' - Bisq Markets';
return this.baseTitle + ' - ' + (this.network ? this.ucfirst(this.network) : 'Bitcoin') + ' Explorer';
}
ucfirst(str: string) {