CORE/CONTENT test5593 и адаптация UI

This commit is contained in:
AidarKC
2026-11-27 00:47:13 +03:00
parent 205b7ad971
commit 873535654e
1271 changed files with 219621 additions and 1900 deletions
@@ -0,0 +1,25 @@
import { t } from '../i18n/index.js';
/** Разделённые шаги V2: независимая проверка логина, затем email. */
import { authService } from '../state.js';
import { normalizeFullLogin } from './shine-namespace-service.js';
async function call(op, payload = {}) {
const response = await authService.ws.request(op, payload, op==='ConfirmFreeRegistration'?150000:18000);
if (response.status !== 200 || response.ok === false) {
const error=new Error(response.message || response.error || t('remaining.registration_api.server_error', { op }));
error.code=response.error || 'REGISTRATION_REQUEST_FAILED';
throw error;
}
return response.payload || {};
}
export const getRegistrationNamespaces = () => call('GetNamespaces');
export const checkRegistrationLogin = (fullLogin) => call('CheckRegistrationLogin', { fullLogin: normalizeFullLogin(fullLogin) });
export const checkRegistrationEmail = (email) => call('CheckRegistrationEmail', { email });
export const startFreeRegistration = ({ fullLogin, keyBundle, email }) => call('StartFreeRegistration', {
fullLogin: normalizeFullLogin(fullLogin), email,
rootPublicKeyB64: keyBundle.rootPair.publicKeyB64,
blockchainPublicKeyB64: keyBundle.blockchainPair.publicKeyB64,
clientPublicKeyB64: keyBundle.clientPair.publicKeyB64,
});
export const confirmFreeRegistration = (challengeId, code) => call('ConfirmFreeRegistration',{challengeId,code});
export const getRegistrationStatus = (fullLogin) => call('GetRegistrationStatus',{fullLogin: normalizeFullLogin(fullLogin)});