f
This commit is contained in:
1
src/pages/converter-test/index.ts
Normal file
1
src/pages/converter-test/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { ConverterTestPage } from './ui/ConverterTestPage'
|
||||
133
src/pages/converter-test/ui/ConverterTestPage.module.css
Normal file
133
src/pages/converter-test/ui/ConverterTestPage.module.css
Normal file
@@ -0,0 +1,133 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2rem 1rem;
|
||||
}
|
||||
|
||||
.wrap {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
max-width: 900px;
|
||||
background: var(--glass-bg);
|
||||
border: 1px solid var(--glass-border);
|
||||
border-radius: 24px;
|
||||
padding: 40px;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: clamp(32px, 4vw, 48px);
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.subtitle {
|
||||
font-size: 15px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-secondary);
|
||||
margin-top: 12px;
|
||||
max-width: 560px;
|
||||
}
|
||||
|
||||
.body {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 48px;
|
||||
}
|
||||
|
||||
.formCol {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.hint {
|
||||
font-size: 12px;
|
||||
color: var(--highlight);
|
||||
margin-top: -12px;
|
||||
}
|
||||
|
||||
/* Панель условий / комиссии */
|
||||
.infoCol {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.infoTitle {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 1px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.infoRow {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 14px 18px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--glass-border);
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.infoRow[data-accent] {
|
||||
border-color: var(--grad-center);
|
||||
background: rgba(91, 61, 184, 0.12);
|
||||
}
|
||||
|
||||
.infoLabel {
|
||||
font-size: 13px;
|
||||
color: var(--text-secondary);
|
||||
}
|
||||
|
||||
.infoValue {
|
||||
font-family: var(--font-mono);
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.note {
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
color: var(--text-secondary);
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.submitBtn {
|
||||
width: 100%;
|
||||
margin-top: 40px;
|
||||
padding: 18px;
|
||||
border-radius: 12px;
|
||||
background: var(--grad-center);
|
||||
color: var(--text-primary);
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 1px;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.submitBtn:disabled {
|
||||
opacity: 0.4;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.wrap {
|
||||
padding: 28px 20px;
|
||||
}
|
||||
|
||||
.body {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
}
|
||||
105
src/pages/converter-test/ui/ConverterTestPage.tsx
Normal file
105
src/pages/converter-test/ui/ConverterTestPage.tsx
Normal file
@@ -0,0 +1,105 @@
|
||||
import { useState } from 'react'
|
||||
import { FormField } from '@shared/ui'
|
||||
import styles from './ConverterTestPage.module.css'
|
||||
|
||||
const MIN_ORDER = 500_000
|
||||
const APPROX_RATE = 0.03 // примерная комиссия 3% для крупных заявок
|
||||
|
||||
const ru = (n: number) => n.toLocaleString('ru-RU', { maximumFractionDigits: 0 })
|
||||
|
||||
export function ConverterTestPage() {
|
||||
const [amount, setAmount] = useState('')
|
||||
const [name, setName] = useState('')
|
||||
const [contact, setContact] = useState('')
|
||||
|
||||
const numAmount = Number(amount.replace(/\D/g, '')) || 0
|
||||
const belowMin = numAmount > 0 && numAmount < MIN_ORDER
|
||||
const commission = numAmount * APPROX_RATE
|
||||
|
||||
const handleAmountChange = (value: string) => {
|
||||
const digits = value.replace(/\D/g, '')
|
||||
setAmount(digits ? ru(Number(digits)) : '')
|
||||
}
|
||||
|
||||
const handleSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault()
|
||||
// Тестовая страница — заявка никуда не отправляется.
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<form className={styles.wrap} onSubmit={handleSubmit}>
|
||||
<div className={styles.header}>
|
||||
<h1 className={styles.title}>Оставить заявку</h1>
|
||||
<p className={styles.subtitle}>
|
||||
Конвертация крупных объёмов по индивидуальному курсу. Оставьте заявку —
|
||||
менеджер свяжется с вами, подтвердит актуальный курс и сопроводит сделку.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div className={styles.body}>
|
||||
<div className={styles.formCol}>
|
||||
<FormField
|
||||
label="Объём заявки, ₽"
|
||||
type="text"
|
||||
value={amount}
|
||||
onChange={handleAmountChange}
|
||||
placeholder="от 500 000"
|
||||
/>
|
||||
{belowMin && (
|
||||
<p className={styles.hint}>
|
||||
Минимальный объём заявки — {ru(MIN_ORDER)} ₽
|
||||
</p>
|
||||
)}
|
||||
|
||||
<FormField
|
||||
label="Как к вам обращаться"
|
||||
type="text"
|
||||
value={name}
|
||||
onChange={setName}
|
||||
placeholder="Имя"
|
||||
/>
|
||||
|
||||
<FormField
|
||||
label="Email или телефон для связи"
|
||||
type="text"
|
||||
value={contact}
|
||||
onChange={setContact}
|
||||
placeholder="example@mail.ru / +7 900 000-00-00"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className={styles.infoCol}>
|
||||
<div className={styles.infoTitle}>УСЛОВИЯ</div>
|
||||
|
||||
<div className={styles.infoRow}>
|
||||
<span className={styles.infoLabel}>Минимальный объём</span>
|
||||
<span className={styles.infoValue}>{ru(MIN_ORDER)} ₽</span>
|
||||
</div>
|
||||
|
||||
<div className={styles.infoRow}>
|
||||
<span className={styles.infoLabel}>Примерная комиссия</span>
|
||||
<span className={styles.infoValue}>{(APPROX_RATE * 100).toFixed(0)} %</span>
|
||||
</div>
|
||||
|
||||
<div className={styles.infoRow} data-accent>
|
||||
<span className={styles.infoLabel}>Комиссия с объёма</span>
|
||||
<span className={styles.infoValue}>
|
||||
{numAmount > 0 ? `≈ ${ru(commission)} ₽` : '—'}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<p className={styles.note}>
|
||||
Итоговая комиссия рассчитывается индивидуально и зависит от объёма,
|
||||
валюты и направления сделки.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<button type="submit" className={styles.submitBtn} disabled={belowMin}>
|
||||
Оставить заявку
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
1
src/pages/register-test/index.ts
Normal file
1
src/pages/register-test/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { RegisterTestPage } from './ui/RegisterTestPage'
|
||||
227
src/pages/register-test/ui/RegisterTestPage.module.css
Normal file
227
src/pages/register-test/ui/RegisterTestPage.module.css
Normal file
@@ -0,0 +1,227 @@
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
.card {
|
||||
background: var(--glass-bg);
|
||||
border: 1px solid var(--glass-border);
|
||||
border-radius: 24px;
|
||||
padding: 32px;
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.logo img {
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.title {
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 24px;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
/* Переключатель типа регистрации */
|
||||
.typeSwitch {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 4px;
|
||||
padding: 4px;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
border: 1px solid var(--glass-border);
|
||||
border-radius: 14px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.typeOption {
|
||||
appearance: none;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
padding: 12px 16px;
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
transition: background 0.18s ease, color 0.18s ease;
|
||||
}
|
||||
|
||||
.typeOption:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.typeOptionActive {
|
||||
background: var(--interactive);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.twoCol {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 20px 24px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.leftCol {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.rightCol {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.codeHint {
|
||||
font-size: 12px;
|
||||
color: var(--text-secondary);
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
/* Кнопка возврата на шаг ввода данных */
|
||||
.backButton {
|
||||
appearance: none;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
padding: 0;
|
||||
margin-bottom: 16px;
|
||||
cursor: pointer;
|
||||
transition: color 0.18s ease;
|
||||
}
|
||||
|
||||
.backButton:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
/* Документы для юридического лица */
|
||||
.documents {
|
||||
margin-top: 24px;
|
||||
padding: 20px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid var(--glass-border);
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
.documentsTitle {
|
||||
font-size: 15px;
|
||||
font-weight: 700;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.documentsSubtitle {
|
||||
font-size: 12px;
|
||||
color: var(--text-secondary);
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.documentsList {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.documentItem {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
padding: 12px 14px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
border: 1px solid var(--glass-border);
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.documentName {
|
||||
font-size: 13px;
|
||||
color: var(--text-primary);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.attachButton {
|
||||
flex-shrink: 0;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--interactive);
|
||||
padding: 8px 14px;
|
||||
border: 1px solid var(--interactive);
|
||||
border-radius: 10px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
transition: background 0.18s ease, color 0.18s ease;
|
||||
}
|
||||
|
||||
.attachButton:hover {
|
||||
background: var(--interactive);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.fileInput {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.error {
|
||||
color: #ff5a5a;
|
||||
font-size: 13px;
|
||||
margin-top: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.submitWrapper {
|
||||
margin-top: 28px;
|
||||
}
|
||||
|
||||
.legal {
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
color: var(--text-secondary);
|
||||
margin-top: 20px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.legal a {
|
||||
color: var(--interactive);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.legal a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.card {
|
||||
padding: 32px 20px;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.twoCol {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.documentItem {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
155
src/pages/register-test/ui/RegisterTestPage.tsx
Normal file
155
src/pages/register-test/ui/RegisterTestPage.tsx
Normal file
@@ -0,0 +1,155 @@
|
||||
import { useState } from 'react'
|
||||
import { FormField, PrimaryButton, Button } from '@shared/ui'
|
||||
import logo from '@shared/assets/logo-full-white.png'
|
||||
import styles from './RegisterTestPage.module.css'
|
||||
|
||||
type AccountType = 'individual' | 'legal'
|
||||
type Step = 'info' | 'documents'
|
||||
|
||||
const LEGAL_DOCUMENTS = [
|
||||
'Свидетельство о государственной регистрации (ОГРН)',
|
||||
'Свидетельство о постановке на учёт в налоговом органе (ИНН)',
|
||||
'Устав организации (действующая редакция)',
|
||||
'Решение/протокол о назначении руководителя',
|
||||
'Документ, подтверждающий полномочия лица, открывающего счёт',
|
||||
'Карточка с образцами подписей и оттиска печати',
|
||||
]
|
||||
|
||||
export function RegisterTestPage() {
|
||||
const [email, setEmail] = useState('')
|
||||
const [password, setPassword] = useState('')
|
||||
const [confirmPassword, setConfirmPassword] = useState('')
|
||||
const [verificationCode, setVerificationCode] = useState('')
|
||||
|
||||
const [accountType, setAccountType] = useState<AccountType>('individual')
|
||||
const [step, setStep] = useState<Step>('info')
|
||||
const isLegal = accountType === 'legal'
|
||||
|
||||
// Тестовая страница — без проверок и запросов. «Создать» просто ведёт на шаг 2.
|
||||
const handleInfoSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault()
|
||||
setStep('documents')
|
||||
}
|
||||
|
||||
const handleDocumentsSubmit = (e: React.FormEvent) => {
|
||||
e.preventDefault()
|
||||
// Тестовая страница — отправки нет.
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
{step === 'info' ? (
|
||||
<form className={styles.card} onSubmit={handleInfoSubmit}>
|
||||
<div className={styles.logo}>
|
||||
<img src={logo} alt="ЭКСА" />
|
||||
</div>
|
||||
<h1 className={styles.title}>Создать кошелёк ЭКСА</h1>
|
||||
|
||||
{/* Выбор типа регистрации — перед всеми полями */}
|
||||
<div className={styles.typeSwitch} role="tablist" aria-label="Тип регистрации">
|
||||
<button
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-selected={!isLegal}
|
||||
className={`${styles.typeOption} ${!isLegal ? styles.typeOptionActive : ''}`}
|
||||
onClick={() => setAccountType('individual')}
|
||||
>
|
||||
Физическое лицо
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
role="tab"
|
||||
aria-selected={isLegal}
|
||||
className={`${styles.typeOption} ${isLegal ? styles.typeOptionActive : ''}`}
|
||||
onClick={() => setAccountType('legal')}
|
||||
>
|
||||
Юридическое лицо
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div className={styles.twoCol}>
|
||||
<div className={styles.leftCol}>
|
||||
<FormField
|
||||
label={isLegal ? 'Введите корпоративный email' : 'Введите адрес электронной почты'}
|
||||
type="email"
|
||||
value={email}
|
||||
onChange={setEmail}
|
||||
placeholder={isLegal ? 'name@company.ru' : 'example@mail.ru'}
|
||||
/>
|
||||
<FormField
|
||||
label="Придумайте пароль"
|
||||
type="password"
|
||||
value={password}
|
||||
onChange={setPassword}
|
||||
placeholder="••••••••"
|
||||
/>
|
||||
<FormField
|
||||
label="Повторите пароль"
|
||||
type="password"
|
||||
value={confirmPassword}
|
||||
onChange={setConfirmPassword}
|
||||
placeholder="••••••••"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className={styles.rightCol}>
|
||||
<Button variant="ghost" type="button">
|
||||
Получить проверочный код
|
||||
</Button>
|
||||
<span className={styles.codeHint}>Код не пришёл</span>
|
||||
<FormField
|
||||
label="Ввести код"
|
||||
type="text"
|
||||
value={verificationCode}
|
||||
onChange={setVerificationCode}
|
||||
placeholder="000 000"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className={styles.submitWrapper}>
|
||||
<PrimaryButton label="Создать" />
|
||||
</div>
|
||||
|
||||
<p className={styles.legal}>
|
||||
Нажимая «Создать», вы принимаете<br />
|
||||
<a href="#">Пользовательское соглашение</a> и <a href="#">Политику конфиденциальности</a>
|
||||
</p>
|
||||
</form>
|
||||
) : (
|
||||
/* Шаг 2: прикрепление документов (только юр. лицо) */
|
||||
<form className={styles.card} onSubmit={handleDocumentsSubmit}>
|
||||
<div className={styles.logo}>
|
||||
<img src={logo} alt="ЭКСА" />
|
||||
</div>
|
||||
|
||||
<button type="button" className={styles.backButton} onClick={() => setStep('info')}>
|
||||
← Назад к данным
|
||||
</button>
|
||||
|
||||
<h1 className={styles.title}>Прикрепите документы</h1>
|
||||
<p className={styles.documentsSubtitle}>
|
||||
Для открытия счёта юридическому лицу прикрепите сканы или фотографии
|
||||
следующих документов:
|
||||
</p>
|
||||
|
||||
<ul className={styles.documentsList}>
|
||||
{LEGAL_DOCUMENTS.map((doc) => (
|
||||
<li key={doc} className={styles.documentItem}>
|
||||
<span className={styles.documentName}>{doc}</span>
|
||||
<label className={styles.attachButton}>
|
||||
Прикрепить
|
||||
<input type="file" className={styles.fileInput} multiple />
|
||||
</label>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
<div className={styles.submitWrapper}>
|
||||
<PrimaryButton label="Создать аккаунт" />
|
||||
</div>
|
||||
</form>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
@@ -3,7 +3,7 @@ import { useMe } from '@features/auth'
|
||||
import { ROUTES } from '@shared/config/routes'
|
||||
import { usePortfolio, useCreateWallet, CHAINS, type Chain } from '@features/wallet'
|
||||
import { BalanceCard } from '@widgets/balance-card'
|
||||
import { TokenTable } from '@widgets/token-table'
|
||||
import { TokenTable, AllTokenTable } from '@widgets/token-table'
|
||||
import { WalletHeader } from '@widgets/wallet-header'
|
||||
import { WalletChainTabs } from '@widgets/wallet-chain-tabs'
|
||||
import { Button } from '@shared/ui'
|
||||
@@ -25,8 +25,6 @@ export function WalletPage() {
|
||||
const upper = chainParam?.toUpperCase() as Chain | undefined
|
||||
const chain: Chain | undefined = upper && CHAINS.includes(upper) ? upper : undefined
|
||||
|
||||
if (!noWallet && !chain) return <Navigate to="/wallet/btc" replace />
|
||||
|
||||
return (
|
||||
<div className={styles.page}>
|
||||
<WalletHeader />
|
||||
@@ -47,7 +45,7 @@ export function WalletPage() {
|
||||
<>
|
||||
<BalanceCard />
|
||||
<WalletChainTabs />
|
||||
<TokenTable chain={chain!} />
|
||||
{chain ? <TokenTable chain={chain} /> : <AllTokenTable />}
|
||||
</>
|
||||
)}
|
||||
</main>
|
||||
|
||||
Reference in New Issue
Block a user