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') {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user