[ui] disable sign in button in global footer

This commit is contained in:
nymkappa 2024-03-09 17:33:38 +09:00
parent c3d90d573f
commit 10819fda6d
No known key found for this signature in database
GPG Key ID: 92358FC85D9645DE
3 changed files with 3 additions and 4 deletions

View File

@ -89,6 +89,7 @@ const defaultEnv: Env = {
})
export class StateService {
isBrowser: boolean = isPlatformBrowser(this.platformId);
isMempoolSpaceBuild = window['isMempoolSpaceBuild'] ?? false;
network = '';
lightning = false;
blockVSize: number;

View File

@ -21,12 +21,12 @@
<div class="selector">
<app-rate-unit-selector></app-rate-unit-selector>
</div>
<a *ngIf="servicesEnabled" class="btn btn-purple sponsor d-none d-sm-flex justify-content-center" [routerLink]="['/login' | relativeUrl]">
<a *ngIf="stateService.isMempoolSpaceBuild" class="btn btn-purple sponsor d-none d-sm-flex justify-content-center" [routerLink]="['/login' | relativeUrl]">
<span *ngIf="loggedIn" i18n="shared.my-account">My Account</span>
<span *ngIf="!loggedIn" i18n="shared.sign-in">Sign In</span>
</a>
</div>
<a *ngIf="servicesEnabled" class="btn btn-purple sponsor d-flex d-sm-none justify-content-center ml-auto mr-auto mt-0 mb-2" [routerLink]="['/login' | relativeUrl]">
<a *ngIf="stateService.isMempoolSpaceBuild" class="btn btn-purple sponsor d-flex d-sm-none justify-content-center ml-auto mr-auto mt-0 mb-2" [routerLink]="['/login' | relativeUrl]">
<span *ngIf="loggedIn" i18n="shared.my-account">My Account</span>
<span *ngIf="!loggedIn" i18n="shared.sign-in">Sign In</span>
</a>

View File

@ -30,7 +30,6 @@ export class GlobalFooterComponent implements OnInit {
loggedIn = false;
urlSubscription: Subscription;
isServicesPage = false;
servicesEnabled = false;
constructor(
public stateService: StateService,
@ -45,7 +44,6 @@ export class GlobalFooterComponent implements OnInit {
) {}
ngOnInit(): void {
this.servicesEnabled = this.officialMempoolSpace && this.stateService.env.ACCELERATOR === true && this.stateService.network === '';
this.isServicesPage = this.router.url.includes('/services/');
this.env = this.stateService.env;