Merge pull request #4755 from mempool/nymkappa/sign-in-button
Update CTAs
This commit is contained in:
commit
c55c298fb5
@ -219,7 +219,7 @@
|
||||
</ng-container>
|
||||
|
||||
<!-- LOGIN CTA -->
|
||||
<ng-container *ngIf="!isLoggedIn()">
|
||||
<ng-container *ngIf="stateService.isMempoolSpaceBuild && !isLoggedIn()">
|
||||
<tr class="group-first group-last" style="border-top: 1px dashed grey">
|
||||
<td class="item"></td>
|
||||
<td class="amt"></td>
|
||||
@ -228,6 +228,15 @@
|
||||
</td>
|
||||
</tr>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!stateService.isMempoolSpaceBuild">
|
||||
<tr class="group-first group-last" style="border-top: 1px dashed grey">
|
||||
<td class="item"></td>
|
||||
<td class="amt"></td>
|
||||
<td class="units d-flex">
|
||||
<a [href]="'https://mempool.space/tx/' + tx.txid + '#accelerate'" class="btn btn-purple flex-grow-1">Accelerate on mempool.space</a>
|
||||
</td>
|
||||
</tr>
|
||||
</ng-container>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -6,6 +6,7 @@ import { Transaction } from '../../interfaces/electrs.interface';
|
||||
import { nextRoundNumber } from '../../shared/common.utils';
|
||||
import { ServicesApiServices } from '../../services/services-api.service';
|
||||
import { AudioService } from '../../services/audio.service';
|
||||
import { StateService } from '../../services/state.service';
|
||||
|
||||
export type AccelerationEstimate = {
|
||||
txSummary: TxSummary;
|
||||
@ -63,6 +64,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
|
||||
maxRateOptions: RateOption[] = [];
|
||||
|
||||
constructor(
|
||||
public stateService: StateService,
|
||||
private servicesApiService: ServicesApiServices,
|
||||
private storageService: StorageService,
|
||||
private audioService: AudioService,
|
||||
|
@ -89,6 +89,7 @@ const defaultEnv: Env = {
|
||||
})
|
||||
export class StateService {
|
||||
isBrowser: boolean = isPlatformBrowser(this.platformId);
|
||||
isMempoolSpaceBuild = window['isMempoolSpaceBuild'] ?? false;
|
||||
network = '';
|
||||
lightning = false;
|
||||
blockVSize: number;
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user