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

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') {
+11
View File
@@ -9910,6 +9910,17 @@ body.chat-topbar-overlay .composer-slot > * {
padding: 0 0 10px;
}
.user-profile-full-name {
width: min(88%, 340px);
margin: 0 auto clamp(8px, 1.4vh, 12px);
color: rgba(239, 246, 255, 0.94);
font-size: clamp(16px, 4.5vw, 19px);
font-weight: 700;
line-height: 1.2;
text-align: center;
overflow-wrap: anywhere;
}
.user-profile-hero {
display: grid;
grid-template-columns: minmax(0, 1fr) var(--user-profile-avatar-size) minmax(0, 1fr);