[accelerator] on mobile, autoscroll after selection cashapp or applepay

This commit is contained in:
nymkappa 2024-07-21 22:38:49 +02:00
parent 920f225e6c
commit 08d3beed72
No known key found for this signature in database
GPG Key ID: 92358FC85D9645DE
2 changed files with 4 additions and 2 deletions

View File

@ -427,7 +427,7 @@
</div> </div>
} @else if (step === 'cashapp' || step === 'applepay') { } @else if (step === 'cashapp' || step === 'applepay') {
<!-- Show checkout page --> <!-- Show checkout page -->
<div class="row mb-md-1 text-center"> <div class="row mb-md-1 text-center" id="confirm-title">
<div class="col-sm" id="confirm-payment-title"> <div class="col-sm" id="confirm-payment-title">
<h1 style="font-size: larger;"><ng-content select="[slot='checkout-title']"></ng-content><span class="default-slot" i18n="accelerator.confirm-your-payment">Confirm your payment</span></h1> <h1 style="font-size: larger;"><ng-content select="[slot='checkout-title']"></ng-content><span class="default-slot" i18n="accelerator.confirm-your-payment">Confirm your payment</span></h1>
</div> </div>
@ -557,7 +557,7 @@
<button type="button" *ngIf="advancedEnabled" class="btn btn-sm btn-outline-info btn-small-height ml-2" (click)="moveToStep('quote')" i18n="accelerator.customize">customize</button> <button type="button" *ngIf="advancedEnabled" class="btn btn-sm btn-outline-info btn-small-height ml-2" (click)="moveToStep('quote')" i18n="accelerator.customize">customize</button>
</ng-template> </ng-template>
<ng-template #accelerateTo let-x i18n="accelerator.accelerate-to-x">Accelerate to ~{{ x | number : '1.0-0' }} sat/vB</ng-template> <ng-template id="accelerate-to" #accelerateTo let-x i18n="accelerator.accelerate-to-x">Accelerate to ~{{ x | number : '1.0-0' }} sat/vB</ng-template>
<ng-template #accelerateButton> <ng-template #accelerateButton>
<div class="position-relative"> <div class="position-relative">

View File

@ -214,10 +214,12 @@ export class AccelerateCheckout implements OnInit, OnDestroy {
this.loadingCashapp = true; this.loadingCashapp = true;
this.insertSquare(); this.insertSquare();
this.setupSquare(); this.setupSquare();
this.scrollToElementWithTimeout('confirm-title', 'center', 100);
} else if (this._step === 'applepay' && this.applePayEnabled) { } else if (this._step === 'applepay' && this.applePayEnabled) {
this.loadingApplePay = true; this.loadingApplePay = true;
this.insertSquare(); this.insertSquare();
this.setupSquare(); this.setupSquare();
this.scrollToElementWithTimeout('confirm-title', 'center', 100);
} else if (this._step === 'paid') { } else if (this._step === 'paid') {
this.timePaid = Date.now(); this.timePaid = Date.now();
this.timeoutTimer = setTimeout(() => { this.timeoutTimer = setTimeout(() => {