SHA256
Вернуть профильные элементы
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user