Связи UI: сияние и бейдж официального

- Добавлен визуальный эффект сияния вокруг круга для аккаунтов с флагом 'Сияющий'.

- Добавлен бейдж 'ОФ' над узлом для официальных аккаунтов.
This commit is contained in:
AidarKC
2026-04-17 23:56:11 +03:00
parent ba3ee4290f
commit f0b560ec06
2 changed files with 47 additions and 1 deletions
+10 -1
View File
@@ -92,7 +92,14 @@ function spread(count, start, end) {
function buildNodeElement({ login, kind = 'friend', isCenter = false, mark = null }) {
const node = document.createElement('button');
node.type = 'button';
node.className = `node ${isCenter ? 'center' : ''} ${kind === 'relative' ? 'is-relative' : 'is-friend'}`.trim();
const classes = [
'node',
isCenter ? 'center' : '',
kind === 'relative' ? 'is-relative' : 'is-friend',
mark?.shine ? 'is-shine' : '',
mark?.official ? 'is-official' : '',
].filter(Boolean);
node.className = classes.join(' ');
node.dataset.nodeLogin = login;
const metaParts = [];
@@ -101,7 +108,9 @@ function buildNodeElement({ login, kind = 'friend', isCenter = false, mark = nul
const metaText = metaParts.join(', ');
node.title = metaText ? `${login}\n${metaText}` : login;
const officialBadge = mark?.official ? '<span class="node-badge-official" aria-hidden="true">ОФ</span>' : '';
node.innerHTML = `
${officialBadge}
<span class="node-dot">${(login[0] || '?').toUpperCase()}</span>
<span class="node-label">${login}</span>
`;