Исправить регистрацию и навести порядок в UI deploy

This commit is contained in:
AidarKC
2026-07-16 11:46:42 +04:00
parent 24cca1f1c6
commit d2c0ecdf62
31 changed files with 207 additions and 65 deletions
@@ -1,5 +1,5 @@
import { resolveShineServerByServerLogin } from './shine-server-resolver.js';
import { SOLANA_ENDPOINT_DEFAULT } from '../solana-programs.js';
import { state } from '../state.js';
function normalizeUrl(value) {
return String(value || '').trim();
@@ -121,12 +121,13 @@ export async function resolveAndCheckShineServerLogin(serverLogin, solanaEndpoin
};
}
export async function checkServerAvailabilityByKey(key, url) {
export async function checkServerAvailabilityByKey(key, url, options = {}) {
const selectedSolanaEndpoint = normalizeUrl(options?.solanaEndpoint || state.entrySettings.solanaServer);
if (key === 'solanaServer') {
return (await checkSolanaRpc(url)) ? 'available' : 'unavailable';
}
if (key === 'shineServerLogin') {
return (await resolveAndCheckShineServerLogin(url, SOLANA_ENDPOINT_DEFAULT)).status;
return (await resolveAndCheckShineServerLogin(url, selectedSolanaEndpoint)).status;
}
if (key === 'shineServer') {
return (await checkShineWs(url)) ? 'available' : 'unavailable';