This commit is contained in:
2026-05-04 23:56:38 +04:00
parent f97f4b5d96
commit cf634f766f
20 changed files with 405 additions and 439 deletions

View File

@@ -2,24 +2,24 @@
<div class="card">
<div class="card__header">
<a class="back" routerLink="/" aria-label="Назад">
<a class="back" routerLink="/" [attr.aria-label]="'create.back_label' | translate">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor"
stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M15 18l-6-6 6-6" />
</svg>
</a>
<h1 class="card__title">
Новый
{{ 'create.title' | translate }}&nbsp;
<span class="brand"><span class="brand__fast">fast</span><span class="brand__check">CHECK</span></span>
</h1>
<p class="card__subtitle">Укажите сумму для пополнения</p>
<p class="card__subtitle">{{ 'create.subtitle' | translate }}</p>
</div>
<div class="card__body">
<!-- Payment methods -->
<div class="field">
<span class="field__label">Способ оплаты</span>
<span class="field__label">{{ 'create.payment_label' | translate }}</span>
<div class="methods">
<button type="button" class="method" [class.method--active]="payment() === 'sbp'"
(click)="selectPayment('sbp', true)" aria-label="СБП">
@@ -41,31 +41,26 @@
<!-- Currencies -->
<div class="field">
<span class="field__label">Валюта</span>
<span class="field__label">{{ 'create.currency_label' | translate }}</span>
<div class="currencies">
<button type="button" class="chip" [class.chip--active]="currency() === 'RUB'"
(click)="selectCurrency('RUB', true)">
<!-- <span class="chip__flag">🇷🇺</span> -->
<span class="chip__sign"></span>
<span class="chip__code">RUB</span>
</button>
<button type="button" class="chip chip--disabled" disabled>
<!-- <span class="chip__flag">🇨🇳</span> -->
<span class="chip__sign">¥</span>
<span class="chip__code">CNY</span>
</button>
<button type="button" class="chip chip--disabled" disabled>
<!-- <span class="chip__flag">🇺🇸</span> -->
<span class="chip__sign">$</span>
<span class="chip__code">USD</span>
</button>
<button type="button" class="chip chip--disabled" disabled>
<!-- <span class="chip__flag">🇪🇺</span> -->
<span class="chip__sign"></span>
<span class="chip__code">EUR</span>
</button>
<button type="button" class="chip chip--disabled" disabled>
<!-- <span class="chip__flag">🇦🇲</span> -->
<span class="chip__sign">֏</span>
<span class="chip__code">AMD</span>
</button>
@@ -73,7 +68,7 @@
</div>
<div class="field">
<label class="field__label" for="amount">Сумма платежа</label>
<label class="field__label" for="amount">{{ 'create.amount_label' | translate }}</label>
<div class="input-wrap" [class.input-wrap--error]="error()">
<span class="input-wrap__prefix"></span>
<input
@@ -95,13 +90,13 @@
</div>
<div class="field">
<label class="field__label" for="note">Примечание</label>
<label class="field__label" for="note">{{ 'create.note_label' | translate }}</label>
<textarea
id="note"
class="note-input"
[ngModel]="note()"
(ngModelChange)="onNoteChange($event)"
placeholder="Причина платежа..."
[placeholder]="'create.note_placeholder' | translate"
rows="3"
maxlength="500"
></textarea>
@@ -115,9 +110,9 @@
</svg>
</span>
@if (loading()) {
Создание…
{{ 'create.creating' | translate }}
} @else {
Создать&nbsp;
{{ 'create.create_btn' | translate }}&nbsp;
<span class="brand"><span class="brand__fast">fast</span><span class="brand__check">CHECK</span></span>
}
</button>
@@ -129,7 +124,7 @@
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
</svg>
Защищённое соединение
{{ 'common.secure' | translate }}
</span>
</div>
</div>

View File

@@ -4,6 +4,7 @@ import { Router, RouterLink } from '@angular/router';
import { HttpClient } from '@angular/common/http';
import { FastcheckService } from '../../fastcheck.service';
import { FASTCHECK_API } from '../../api';
import { TranslatePipe } from '../../translate/translate.pipe';
interface CreateFastcheckResponse {
fastcheck: string;
@@ -17,7 +18,7 @@ type Currency = 'RUB' | 'CNY' | 'USD' | 'EUR' | 'AMD';
@Component({
selector: 'app-create-page',
imports: [FormsModule, RouterLink],
imports: [FormsModule, RouterLink, TranslatePipe],
templateUrl: './create-page.html',
styleUrl: './create-page.scss'
})

View File

@@ -5,9 +5,7 @@
<img class="card__brand" src="/logo_big.png"
alt="fastCHECK" width="220" height="60" />
<p class="card__subtitle">
Введите данные
<span class="brand"><span class="brand__fast">fast</span><span class="brand__check">CHECK</span></span>
или создайте новый
{{ 'fastcheck.subtitle' | translate }}
</p>
</div>
@@ -16,8 +14,7 @@
<!-- Fastcheck number + new -->
<div class="field">
<label class="field__label" for="fcNumber">
Номер
<span class="brand"><span class="brand__fast">fast</span><span class="brand__check">CHECK</span></span>
{{ 'fastcheck.number_label' | translate }}
</label>
<div class="row">
<input
@@ -26,18 +23,18 @@
class="input"
[ngModel]="fastcheckNumber()"
(ngModelChange)="onNumberChange($event)"
placeholder="1234-5678-0001"
[placeholder]="'fastcheck.number_placeholder' | translate"
inputmode="numeric"
autocomplete="off"
maxlength="14"
/>
<a class="btn btn--ghost" routerLink="/new" aria-label="Создать новый fastCHECK">Новый</a>
<a class="btn btn--ghost" routerLink="/new" aria-label="Создать новый fastCHECK">{{ 'fastcheck.number_new' | translate }}</a>
</div>
</div>
<!-- Amount -->
<div class="field">
<label class="field__label" for="fcAmount">Сумма</label>
<label class="field__label" for="fcAmount">{{ 'fastcheck.amount_label' | translate }}</label>
<div class="input-wrap">
<span class="input-wrap__prefix"></span>
<input
@@ -54,20 +51,20 @@
/>
</div>
@if (amountLoading()) {
<span class="field__hint">Проверяем…</span>
<span class="field__hint">{{ 'fastcheck.amount_checking' | translate }}</span>
}
</div>
<!-- Code -->
<div class="field">
<label class="field__label" for="fcCode">Код</label>
<label class="field__label" for="fcCode">{{ 'fastcheck.code_label' | translate }}</label>
<input
id="fcCode"
type="text"
class="input"
[ngModel]="fastcheckCode()"
(ngModelChange)="onCodeChange($event)"
placeholder="00000"
[placeholder]="'fastcheck.code_placeholder' | translate"
inputmode="numeric"
maxlength="5"
autocomplete="one-time-code"
@@ -85,7 +82,7 @@
<line x1="1" y1="10" x2="23" y2="10" />
</svg>
</span>
Оплатить
{{ 'fastcheck.pay_btn' | translate }}
</button>
</div>
@@ -95,7 +92,7 @@
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
</svg>
Защищённое соединение
{{ 'common.secure' | translate }}
</span>
</div>
</div>
@@ -113,21 +110,21 @@
stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round">
<path d="M20 6L9 17l-5-5" />
</svg>
<h2 class="modal__title">Оплачено</h2>
<h2 class="modal__title">{{ 'fastcheck.modal_paid_title' | translate }}</h2>
<p class="modal__sub">
<span class="brand"><span class="brand__fast">fast</span><span class="brand__check">CHECK</span></span>
успешно принят.
{{ 'fastcheck.modal_paid_sub' | translate }}
</p>
</div>
} @else {
<img class="brand-logo brand-logo--small" src="/logo_small.png"
alt="fastCHECK" width="32" height="32" />
<h2 class="modal__title">Войти через Telegram</h2>
<p class="modal__sub">Отсканируйте QR или откройте ссылку</p>
<h2 class="modal__title">{{ 'fastcheck.modal_title' | translate }}</h2>
<p class="modal__sub">{{ 'fastcheck.modal_sub' | translate }}</p>
<div class="qr">
@if (popupLoading() && !webSessionId()) {
<div class="qr__placeholder">Загрузка…</div>
<div class="qr__placeholder">{{ 'fastcheck.modal_loading' | translate }}</div>
} @else if (webSessionId()) {
<img [src]="qrUrl()" width="240" height="240" alt="QR Telegram" />
}
@@ -138,14 +135,14 @@
<svg width="18" height="18" viewBox="0 0 24 24" fill="currentColor">
<path d="M9.04 15.65l-.36 4.06c.51 0 .73-.22.99-.48l2.38-2.27 4.93 3.6c.9.5 1.55.24 1.79-.83l3.24-15.18h.01c.29-1.34-.48-1.86-1.36-1.54L1.13 9.66c-1.32.5-1.3 1.23-.22 1.56l4.92 1.53L17.27 5.6c.54-.34 1.03-.15.62.19" />
</svg>
Открыть в Telegram
{{ 'fastcheck.modal_open_tg' | translate }}
</a>
}
@if (popupLoading() && webSessionId()) {
<p class="modal__hint">Подтверждение оплаты…</p>
<p class="modal__hint">{{ 'fastcheck.modal_confirming' | translate }}</p>
} @else if (webSessionId()) {
<p class="modal__hint">Ожидание входа…</p>
<p class="modal__hint">{{ 'fastcheck.modal_waiting' | translate }}</p>
}
@if (popupError()) {

View File

@@ -4,6 +4,7 @@ import { Router, RouterLink } from '@angular/router';
import { HttpClient } from '@angular/common/http';
import { FastcheckService } from '../../fastcheck.service';
import { FASTCHECK_API } from '../../api';
import { TranslatePipe } from '../../translate/translate.pipe';
interface WebSessionResponse {
sessionId: string;
@@ -22,7 +23,7 @@ interface CheckFastcheckResponse {
@Component({
selector: 'app-fastcheck-page',
imports: [FormsModule, RouterLink],
imports: [FormsModule, RouterLink, TranslatePipe],
templateUrl: './fastcheck-page.html',
styleUrl: './fastcheck-page.scss'
})

View File

@@ -6,14 +6,14 @@
<img src="https://sbp.nspk.ru/storage/settings/common/logo/0645d335-8b62-43a1-9a33-0d4c9d1dc0e0.svg"
alt="СБП" />
</div>
<h1 class="card__title">Оплата через СБП</h1>
<p class="card__subtitle">Система быстрых платежей</p>
<h1 class="card__title">{{ 'sbp.title' | translate }}</h1>
<p class="card__subtitle">{{ 'sbp.subtitle' | translate }}</p>
</div>
<div class="card__body">
<div class="field">
<label class="field__label" for="amount">Сумма платежа</label>
<label class="field__label" for="amount">{{ 'sbp.amount_label' | translate }}</label>
<div class="input-wrap" [class.input-wrap--error]="error()">
<span class="input-wrap__prefix"></span>
<input
@@ -37,17 +37,17 @@
<div class="currency-badge">
<span class="currency-badge__flag">🇷🇺</span>
<span class="currency-badge__code">RUB</span>
<span class="currency-badge__name">Российский рубль</span>
<span class="currency-badge__name">{{ 'sbp.currency_name' | translate }}</span>
</div>
<div class="field">
<label class="field__label" for="note">Примечание</label>
<label class="field__label" for="note">{{ 'sbp.note_label' | translate }}</label>
<textarea
id="note"
class="note-input"
[ngModel]="note()"
(ngModelChange)="onNoteChange($event)"
placeholder="Причина платежа..."
[placeholder]="'sbp.note_placeholder' | translate"
rows="3"
maxlength="500"
></textarea>
@@ -61,7 +61,11 @@
<line x1="1" y1="10" x2="23" y2="10" />
</svg>
</span>
{{ loading() ? 'Подождите...' : 'Перейти к оплате' }}
@if (loading()) {
{{ 'sbp.pay_loading' | translate }}
} @else {
{{ 'sbp.pay_btn' | translate }}
}
</button>
</div>
@@ -71,7 +75,7 @@
stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z" />
</svg>
Защищённое соединение
{{ 'common.secure' | translate }}
</span>
</div>
</div>

View File

@@ -2,6 +2,7 @@ import { Component, computed, inject, signal } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { ActivatedRoute } from '@angular/router';
import { HttpClient } from '@angular/common/http';
import { TranslatePipe } from '../../translate/translate.pipe';
interface LegacyPayResponse {
payload?: string;
@@ -17,7 +18,7 @@ interface LegacyPayResponse {
*/
@Component({
selector: 'app-legacy-pay-page',
imports: [FormsModule],
imports: [FormsModule, TranslatePipe],
templateUrl: './legacy-pay-page.html',
styleUrl: './legacy-pay-page.scss'
})