link change

This commit is contained in:
2026-05-06 13:17:54 +04:00
parent f853a498ce
commit 9fc7fbbae2
4 changed files with 44 additions and 4 deletions

View File

@@ -57,7 +57,7 @@
<!-- Share row — always visible, enabled once amount is known -->
<div class="share-row">
<button type="button" class="share-btn share-btn--email" (click)="shareByEmail()"
<!-- <button type="button" class="share-btn share-btn--email" (click)="shareByEmail()"
[disabled]="fastcheckAmount() === null || amountLoading()"
[title]="'fastcheck.share_email' | translate">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor"
@@ -66,7 +66,7 @@
<path d="M2 7l10 7 10-7"/>
</svg>
{{ 'fastcheck.share_email' | translate }}
</button>
</button> -->
<button type="button" class="share-btn share-btn--tg" (click)="shareByTelegram()"
[disabled]="fastcheckAmount() === null || amountLoading()"
[title]="'fastcheck.share_tg' | translate">

View File

@@ -53,7 +53,18 @@
></textarea>
</div>
<button class="pay-btn" type="button" (click)="pay()" [disabled]="loading()">
@if (qrPayUrl()) {
<div class="qr-pay">
<img
[src]="'https://api.qrserver.com/v1/create-qr-code/?size=240x240&margin=8&data=' + qrPayUrl()"
width="240" height="240"
alt="SBP QR"
/>
<p class="qr-pay__hint">Отсканируйте QR-код в приложении вашего банка</p>
</div>
}
<button class="pay-btn" type="button" (click)="pay()" [disabled]="loading() || !!qrPayUrl()">
<span class="pay-btn__icon">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">

View File

@@ -35,6 +35,27 @@
&__name { font-size: 13px; color: #64748b; margin-left: auto; }
}
.qr-pay {
display: flex;
flex-direction: column;
align-items: center;
gap: 12px;
margin-bottom: 20px;
img {
border-radius: 12px;
border: 1px solid #e2e8f0;
display: block;
}
&__hint {
font-size: 13px;
color: #64748b;
text-align: center;
margin: 0;
}
}
.note-input {
width: 100%;
border: 2px solid #e2e8f0;

View File

@@ -36,9 +36,13 @@ export class LegacyPayPage {
note = signal<string>('');
error = signal<string>('');
loading = signal<boolean>(false);
qrPayUrl = signal<string>('');
paymentId = signal<string>('');
readonly isMobile: boolean = typeof navigator !== 'undefined'
&& /android|iphone|ipad|ipod|mobile/i.test(navigator.userAgent);
canPay = computed(() => {
const a = this.amount();
return !!this.paymentId() && a !== null && a > 0 && !this.loading();
@@ -82,7 +86,11 @@ export class LegacyPayPage {
next: (res) => {
this.loading.set(false);
if (res?.payload) {
if (this.isMobile) {
window.location.href = res.payload;
} else {
this.qrPayUrl.set(res.payload);
}
} else {
this.error.set(this.t('errors.payment_failed'));
}