Merge UI redesign v4 в смену ключей

Стартовый экран взят из origin/ui-redesign-v4. Конфликты разрешены с сохранением новой логики blockchain key.
This commit is contained in:
AidarKC
2026-10-01 12:52:32 +03:00
84 changed files with 2506 additions and 1567 deletions
+4 -4
View File
@@ -69,7 +69,7 @@ function renderBlock(title, subtitle, items) {
return card;
}
function renderArrayLine(values, emptyLabel = '—') {
function renderArrayLine(values, emptyLabel = '–') {
const arr = Array.isArray(values) ? values : [];
return arr.length ? arr.join(', ') : emptyLabel;
}
@@ -93,7 +93,7 @@ function renderSessionList(sessions) {
`Session #${idx + 1}`,
`type=${session.sessionType}, version=${session.sessionVersion}`,
[
{ label: 'Имя', value: session.sessionName || '—' },
{ label: 'Имя', value: session.sessionName || '–' },
{ label: 'PubKey', value: base58(session.sessionPubKey32) },
],
));
@@ -153,7 +153,7 @@ function renderParsed(parsed) {
);
blocks.appendChild(renderBlock('BlockchainRegistryBlock', 'block_type=3, version=0', [
{ label: 'forkCount', value: String(parsed.forks?.length || 0) },
{ label: 'forks', value: forkLines.length ? forkLines.join('\n') : '—' },
{ label: 'forks', value: forkLines.length ? forkLines.join('\n') : '–' },
]));
if (parsed.isServer) {
@@ -162,7 +162,7 @@ function renderParsed(parsed) {
);
blocks.appendChild(renderBlock('ServerProfileBlock', 'block_type=30, version=0', [
{ label: 'addressCount', value: String(parsed.serverAddresses?.length || 0) },
{ label: 'address', value: addressLines.length ? addressLines.join('\n') : '—' },
{ label: 'address', value: addressLines.length ? addressLines.join('\n') : '–' },
]));
}
if (Array.isArray(parsed.accessServers) && parsed.accessServers.length) {
+1 -1
View File
@@ -43,7 +43,7 @@ export function formatBigInt(value) {
export function formatTimestamp(value) {
const ts = Number(BigInt(value || 0n));
if (!Number.isFinite(ts) || ts <= 0) return '—';
if (!Number.isFinite(ts) || ts <= 0) return '–';
return new Date(ts).toLocaleString('ru-RU');
}
@@ -171,7 +171,7 @@ $('btnLoad').addEventListener('click', async () => {
$('iVer').textContent = `#${parsed.recordNumber}`;
$('iCreated').textContent = formatTimestamp(parsed.createdAtMs);
$('iUpdated').textContent = formatTimestamp(parsed.updatedAtMs);
$('iSrvAddr').textContent = parsed.serverAddress || '—';
$('iSrvAddr').textContent = parsed.serverAddress || '–';
$('iBch').textContent = parsed.blockchain.blockchainName;
$('iLimit').textContent = formatBigInt(parsed.blockchain.paidLimitBytes);