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>
|
</ng-container>
|
||||||
|
|
||||||
<!-- LOGIN CTA -->
|
<!-- LOGIN CTA -->
|
||||||
<ng-container *ngIf="!isLoggedIn()">
|
<ng-container *ngIf="stateService.isMempoolSpaceBuild && !isLoggedIn()">
|
||||||
<tr class="group-first group-last" style="border-top: 1px dashed grey">
|
<tr class="group-first group-last" style="border-top: 1px dashed grey">
|
||||||
<td class="item"></td>
|
<td class="item"></td>
|
||||||
<td class="amt"></td>
|
<td class="amt"></td>
|
||||||
@ -228,6 +228,15 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</ng-container>
|
</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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,6 +6,7 @@ import { Transaction } from '../../interfaces/electrs.interface';
|
|||||||
import { nextRoundNumber } from '../../shared/common.utils';
|
import { nextRoundNumber } from '../../shared/common.utils';
|
||||||
import { ServicesApiServices } from '../../services/services-api.service';
|
import { ServicesApiServices } from '../../services/services-api.service';
|
||||||
import { AudioService } from '../../services/audio.service';
|
import { AudioService } from '../../services/audio.service';
|
||||||
|
import { StateService } from '../../services/state.service';
|
||||||
|
|
||||||
export type AccelerationEstimate = {
|
export type AccelerationEstimate = {
|
||||||
txSummary: TxSummary;
|
txSummary: TxSummary;
|
||||||
@ -63,6 +64,7 @@ export class AcceleratePreviewComponent implements OnInit, OnDestroy, OnChanges
|
|||||||
maxRateOptions: RateOption[] = [];
|
maxRateOptions: RateOption[] = [];
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
|
public stateService: StateService,
|
||||||
private servicesApiService: ServicesApiServices,
|
private servicesApiService: ServicesApiServices,
|
||||||
private storageService: StorageService,
|
private storageService: StorageService,
|
||||||
private audioService: AudioService,
|
private audioService: AudioService,
|
||||||
|
@ -89,6 +89,7 @@ const defaultEnv: Env = {
|
|||||||
})
|
})
|
||||||
export class StateService {
|
export class StateService {
|
||||||
isBrowser: boolean = isPlatformBrowser(this.platformId);
|
isBrowser: boolean = isPlatformBrowser(this.platformId);
|
||||||
|
isMempoolSpaceBuild = window['isMempoolSpaceBuild'] ?? false;
|
||||||
network = '';
|
network = '';
|
||||||
lightning = false;
|
lightning = false;
|
||||||
blockVSize: number;
|
blockVSize: number;
|
||||||
|
@ -21,12 +21,12 @@
|
|||||||
<div class="selector">
|
<div class="selector">
|
||||||
<app-rate-unit-selector></app-rate-unit-selector>
|
<app-rate-unit-selector></app-rate-unit-selector>
|
||||||
</div>
|
</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.my-account">My Account</span>
|
||||||
<span *ngIf="!loggedIn" i18n="shared.sign-in">Sign In</span>
|
<span *ngIf="!loggedIn" i18n="shared.sign-in">Sign In</span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</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.my-account">My Account</span>
|
||||||
<span *ngIf="!loggedIn" i18n="shared.sign-in">Sign In</span>
|
<span *ngIf="!loggedIn" i18n="shared.sign-in">Sign In</span>
|
||||||
</a>
|
</a>
|
||||||
|
@ -30,7 +30,6 @@ export class GlobalFooterComponent implements OnInit {
|
|||||||
loggedIn = false;
|
loggedIn = false;
|
||||||
urlSubscription: Subscription;
|
urlSubscription: Subscription;
|
||||||
isServicesPage = false;
|
isServicesPage = false;
|
||||||
servicesEnabled = false;
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public stateService: StateService,
|
public stateService: StateService,
|
||||||
@ -45,7 +44,6 @@ export class GlobalFooterComponent implements OnInit {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit(): void {
|
ngOnInit(): void {
|
||||||
this.servicesEnabled = this.officialMempoolSpace && this.stateService.env.ACCELERATOR === true && this.stateService.network === '';
|
|
||||||
this.isServicesPage = this.router.url.includes('/services/');
|
this.isServicesPage = this.router.url.includes('/services/');
|
||||||
|
|
||||||
this.env = this.stateService.env;
|
this.env = this.stateService.env;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user