Обновить кошельки и мелкие детали UI

This commit is contained in:
AidarKC
2026-11-09 09:59:11 +03:00
parent 34f7faf0a8
commit 526941eb33
29 changed files with 469 additions and 201 deletions
+7 -11
View File
@@ -1,4 +1,6 @@
import { createTopBar } from '../components/topbar.js';
import { createVisiblePasswordField } from '../components/visible-password-field.js';
import { confirmPasswordBoundarySpaces } from '../services/password-boundary-warning.js';
import { createRegistrationStepper } from '../components/registration-stepper.js';
import { authService, clearAuthMessages, state } from '../state.js';
import { PASSWORD_MAX_LENGTH } from '../services/password-words.js';
@@ -151,16 +153,7 @@ export function render({ navigate }) {
input.maxLength = PASSWORD_MAX_LENGTH;
input.placeholder = 'Ваш секретный пароль';
input.value = draft.password || '';
const toggle = document.createElement('button');
toggle.className = 'secondary-btn';
toggle.type = 'button';
toggle.textContent = 'Скрыть';
toggle.setAttribute('aria-label', 'Показать или скрыть пароль');
toggle.addEventListener('click', () => {
input.type = input.type === 'password' ? 'text' : 'password';
toggle.textContent = input.type === 'password' ? 'Показать' : 'Скрыть';
});
label.append(labelText, input);
label.append(labelText, createVisiblePasswordField(input));
const guidance = document.createElement('div');
guidance.className = 'signup-guidance';
guidance.innerHTML = `
@@ -185,6 +178,9 @@ export function render({ navigate }) {
return;
}
if (!draft.login || !draft.login.includes('@')) { status.textContent = 'Сначала выберите логин.'; return; }
const warningRevision = inputRevision;
if (!await confirmPasswordBoundarySpaces(value) || !screen.isConnected) return;
if (warningRevision !== inputRevision || input.value !== value) { status.textContent = 'Пароль изменился. Нажмите «Продолжить» ещё раз.'; return; }
if (draft.password && draft.password !== value && !confirmFundedWalletChange()) return;
if (draft.password && draft.password !== value) {
state.registrationPayment.walletAddress = '';
@@ -211,7 +207,7 @@ export function render({ navigate }) {
if (screen.isConnected && thisRequest === requestId) next.disabled = false;
}
});
body.append(heading, description, label, toggle, guidance, status, next);
body.append(heading, description, label, guidance, status, next);
}
if (flowType !== 'free' && flowType !== 'paid') {