Вернуть профильные элементы

This commit is contained in:
2026-09-02 15:02:48 +03:00
parent 8eb2ef438c
commit 09c7f8541e
2 changed files with 18 additions and 4 deletions
+7 -4
View File
@@ -189,11 +189,17 @@ export function render({ navigate, route, chrome }) {
const stats = card.stats || {};
const official = card.accountRole === 'primary';
const shining = card.shineStatus === 'shining';
const fullName = [card.firstName, card.lastName]
.map((value) => String(value || '').trim())
.filter(Boolean)
.join(' ');
const title = header.querySelector('.page-title');
if (title) title.textContent = card.login;
body.innerHTML = `
${fullName ? `<div class="user-profile-full-name">${escapeHtml(fullName)}</div>` : ''}
<div class="user-profile-hero" aria-label="Профиль ${escapeHtml(card.login)}">
${metricHtml({ kind: 'primary_received', label: 'Официальный', value: stats.primaryReceivedCount, glow: official, positionClass: 'is-top-left' })}
${metricHtml({ kind: 'shine_received', label: 'Сияющий', value: stats.shineReceivedCount, glow: shining, positionClass: 'is-top-right' })}
@@ -296,10 +302,7 @@ export function render({ navigate, route, chrome }) {
const action = actionButton?.dataset.profileAction;
if (action === 'add') {
if (!addMenu) return;
const willOpen = addMenu.hidden;
addMenu.hidden = !willOpen;
actionButton.setAttribute('aria-expanded', willOpen ? 'true' : 'false');
if (willOpen && selfLogin) void ensureRelationFlags().catch(() => {});
navigate(`SHiNE/${encodeURIComponent(card.login)}/manage`);
return;
}
if (action === 'links') {