SHA256
UI: сияние в профиле, связь без сдвига экрана, аватары каналов без кольца
- Профиль: золотая «дышащая» аура вокруг аватара сияющего, бейджи «Сияющий» / «Официальный» под именем, разделы «Сияние» и «Официальный аккаунт» со списками «кто подтвердил» и «кого подтвердил» (видны у сияющих и у всех, у кого есть подтверждения). - Кнопки подтверждения на экране связи – по тем же правилам, что проверяет сервер (голосует основной аккаунт, за сияние – основной и сияющий; цель не отказалась). - Экран связи: сохранение показывается на нажатой кнопке, без строки «Сохранение…», которая сдвигала экран; после выбора – сообщение и возврат на страницу пользователя. - В каналах и обсуждениях аватары без стеклянного кольца «Связей» (готовый avatar-plain). - Локальный сервер UI отдаёт Cache-Control: no-cache – иначе браузер брал старый router.js.
This commit is contained in:
@@ -12,29 +12,35 @@ export function escapeProfileHtml(text) {
|
||||
|
||||
const esc = escapeProfileHtml;
|
||||
|
||||
function statusCardHtml({ kind, title, received, given }) {
|
||||
// Раздел статуса («Сияние», «Официальный»): кто подтвердил этот аккаунт и кого подтвердил он сам.
|
||||
function statusSectionHtml({ kind, title, received, given, receivedLabel, givenLabel }) {
|
||||
const receivedCount = Number(received || 0);
|
||||
const givenCount = Number(given || 0);
|
||||
const isOfficial = kind === 'primary';
|
||||
const receivedKind = isOfficial ? 'primary_received' : 'shine_received';
|
||||
const givenKind = isOfficial ? 'primary_given' : 'shine_given';
|
||||
const receivedTitle = isOfficial ? 'Кто подтвердил этот официальный аккаунт' : 'Кто подтвердил, что этот аккаунт сияющий';
|
||||
const givenTitle = isOfficial ? 'Какие официальные аккаунты подтвердил этот пользователь' : 'Кого этот пользователь подтвердил как сияющего';
|
||||
|
||||
return `
|
||||
<section class="pf-status-card pf-status-card--${esc(kind)}" aria-label="${esc(title)}">
|
||||
<div class="pf-status-card-title">${esc(title)}</div>
|
||||
<button type="button" class="pf-status-card-count" data-profile-list="${receivedKind}"
|
||||
aria-label="${esc(receivedTitle)}: ${receivedCount}" title="${esc(receivedTitle)}">
|
||||
<strong>${receivedCount}</strong><span>подтвердили</span>
|
||||
</button>
|
||||
<button type="button" class="pf-status-card-count" data-profile-list="${givenKind}"
|
||||
aria-label="${esc(givenTitle)}: ${givenCount}" title="${esc(givenTitle)}">
|
||||
<strong>${givenCount}</strong><span>подтвердил</span>
|
||||
</button>
|
||||
<section class="pf-status-section pf-status-section--${esc(kind)}" aria-label="${esc(title)}">
|
||||
<h3 class="nav-list__title">${esc(title)}</h3>
|
||||
<div class="nav-list">
|
||||
<button type="button" class="nav-row" data-profile-list="${isOfficial ? 'primary_received' : 'shine_received'}">
|
||||
<span class="nav-row__label">${esc(receivedLabel)}</span>
|
||||
<span class="nav-row__hint">${esc(peopleCount(receivedCount))}</span>
|
||||
</button>
|
||||
<button type="button" class="nav-row" data-profile-list="${isOfficial ? 'primary_given' : 'shine_given'}">
|
||||
<span class="nav-row__label">${esc(givenLabel)}</span>
|
||||
<span class="nav-row__hint">${esc(peopleCount(givenCount))}</span>
|
||||
</button>
|
||||
</div>
|
||||
</section>`;
|
||||
}
|
||||
|
||||
function peopleCount(count) {
|
||||
if (!count) return 'Пока никого';
|
||||
const mod10 = count % 10;
|
||||
const mod100 = count % 100;
|
||||
const word = mod10 === 1 && mod100 !== 11 ? 'человек' : (mod10 >= 2 && mod10 <= 4 && (mod100 < 12 || mod100 > 14)) ? 'человека' : 'человек';
|
||||
return `${count} ${word}`;
|
||||
}
|
||||
|
||||
function statHtml({ kind, label, valueHtml, ariaLabel }) {
|
||||
return `
|
||||
<button type="button" class="pf-stat" data-profile-list="${esc(kind)}" aria-label="${esc(ariaLabel)}">
|
||||
@@ -91,32 +97,42 @@ export function profileCardHtml({ card, login = '', tilesHtml = '', tilesWrapCla
|
||||
const friends = Number(stats.friendsCount || 0);
|
||||
const closeFriends = Number(stats.closeFriendsCount || 0);
|
||||
|
||||
const officialCard = official
|
||||
? statusCardHtml({
|
||||
kind: 'primary',
|
||||
title: 'Официальный',
|
||||
received: stats.primaryReceivedCount,
|
||||
given: stats.primaryGivenCount,
|
||||
})
|
||||
: '';
|
||||
const shiningCard = shining
|
||||
? statusCardHtml({
|
||||
const shineReceived = Number(stats.shineReceivedCount || 0);
|
||||
const shineGiven = Number(stats.shineGivenCount || 0);
|
||||
const primaryReceived = Number(stats.primaryReceivedCount || 0);
|
||||
const primaryGiven = Number(stats.primaryGivenCount || 0);
|
||||
// Раздел виден у сияющих и у всех, кого уже подтверждали или кто подтверждал сам.
|
||||
const shineSection = (shining || shineReceived || shineGiven)
|
||||
? statusSectionHtml({
|
||||
kind: 'shine',
|
||||
title: 'Сияющий',
|
||||
received: stats.shineReceivedCount,
|
||||
given: stats.shineGivenCount,
|
||||
title: 'Сияние',
|
||||
received: shineReceived,
|
||||
given: shineGiven,
|
||||
receivedLabel: 'Подтвердили, что сияющий',
|
||||
givenLabel: 'Подтвердил сияющими',
|
||||
})
|
||||
: '';
|
||||
const officialSection = (official || primaryReceived || primaryGiven)
|
||||
? statusSectionHtml({
|
||||
kind: 'primary',
|
||||
title: 'Официальный аккаунт',
|
||||
received: primaryReceived,
|
||||
given: primaryGiven,
|
||||
receivedLabel: 'Подтвердили, что официальный',
|
||||
givenLabel: 'Подтвердил официальными',
|
||||
})
|
||||
: '';
|
||||
const badges = [
|
||||
shining ? '<span class="pf-badge pf-badge--shine">Сияющий</span>' : '',
|
||||
official ? '<span class="pf-badge pf-badge--official">Официальный</span>' : '',
|
||||
].join('');
|
||||
|
||||
return `
|
||||
<div class="pf-hero" aria-label="Профиль ${esc(cardLogin)}">
|
||||
<div class="pf-identity">
|
||||
<div class="pf-status-card-slot pf-status-card-slot--left">${officialCard}</div>
|
||||
<div class="pf-avatar user-profile-avatar-slot"></div>
|
||||
<div class="pf-status-card-slot pf-status-card-slot--right">${shiningCard}</div>
|
||||
</div>
|
||||
<div class="pf-avatar user-profile-avatar-slot${shining ? ' is-shining' : ''}"></div>
|
||||
<h2 class="pf-name">${esc(displayName)}</h2>
|
||||
<div class="pf-login">@${esc(cardLogin)}</div>
|
||||
${badges ? `<div class="pf-badges">${badges}</div>` : ''}
|
||||
</div>
|
||||
|
||||
<div class="pf-stats">
|
||||
@@ -131,6 +147,8 @@ export function profileCardHtml({ card, login = '', tilesHtml = '', tilesWrapCla
|
||||
<div class="pf-tiles user-profile-actions">${tilesHtml}</div>
|
||||
</div>` : ''}
|
||||
|
||||
${shineSection}
|
||||
${officialSection}
|
||||
${listHtml}`;
|
||||
}
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@ function openChannelProfileEditor({ channel, selector, onSaved }) {
|
||||
avatar: selectedAvatar?.sha256 ? { ar: String(selectedAvatar.ar || ''), sha256Hex: selectedAvatar.sha256 } : null,
|
||||
authorLogin: String(channel?.ownerLogin || state.session.login || '').trim(),
|
||||
size: 'xl',
|
||||
className: 'channel-about-avatar channel-profile-avatar',
|
||||
className: 'channel-about-avatar channel-profile-avatar avatar-plain',
|
||||
title: title || 'Канал',
|
||||
alt: 'Аватар канала',
|
||||
}));
|
||||
@@ -640,7 +640,7 @@ export function render({ navigate, route, chrome }) {
|
||||
avatar: String(channel?.avaAr || channel?.avaSha256 || '').trim() ? { ar: String(channel.avaAr || '').trim(), sha256Hex: String(channel?.avaSha256 || '').trim() } : null,
|
||||
authorLogin: ownerLogin,
|
||||
size: 'xl',
|
||||
className: 'channel-about-avatar channel-profile-avatar',
|
||||
className: 'channel-about-avatar channel-profile-avatar avatar-plain',
|
||||
title: cleanName,
|
||||
alt: 'Аватар канала',
|
||||
});
|
||||
@@ -648,7 +648,7 @@ export function render({ navigate, route, chrome }) {
|
||||
content.querySelector('#channel-about-owner-avatar')?.append(renderAvatar({
|
||||
initials: ownerName.slice(0, 1).toUpperCase() || '?',
|
||||
size: 'md',
|
||||
className: 'channel-about-owner-avatar-img',
|
||||
className: 'channel-about-owner-avatar-img avatar-plain',
|
||||
alt: '',
|
||||
}));
|
||||
|
||||
|
||||
@@ -755,7 +755,7 @@ function renderNodeCard(node, heading, handlers, localNumber, { focusPost = fals
|
||||
avatar: (channel.avatarAr || channel.avatarSha256) ? { ar: channel.avatarAr, sha256Hex: channel.avatarSha256 } : null,
|
||||
authorLogin: author,
|
||||
size: 'xl',
|
||||
className: 'channel-profile-avatar channel-message-avatar',
|
||||
className: 'channel-profile-avatar channel-message-avatar avatar-plain',
|
||||
title,
|
||||
alt: 'Аватар канала',
|
||||
});
|
||||
@@ -1088,7 +1088,7 @@ function renderComment({ node, parent, focus, channelOwner, handlers, nested = f
|
||||
who.type = 'button';
|
||||
who.className = 'thread-comment__who';
|
||||
who.setAttribute('aria-label', `Профиль ${author}`);
|
||||
who.append(identity?.avatar || renderUserAvatar({ login: author, size: nested ? 'xs' : 'sm', className: 'thread-comment__avatar' }));
|
||||
who.append(identity?.avatar || renderUserAvatar({ login: author, size: nested ? 'xs' : 'sm', className: 'thread-comment__avatar avatar-plain' }));
|
||||
who.addEventListener('click', () => handlers.navigate(makeProfileRoute(author)));
|
||||
|
||||
const main = document.createElement('div');
|
||||
@@ -1848,7 +1848,7 @@ export function render({ navigate, route, chrome }) {
|
||||
avatar: (avatarAr || avatarSha256) ? { ar: avatarAr, sha256Hex: avatarSha256 } : null,
|
||||
authorLogin: visibleOwner,
|
||||
size: 'xl',
|
||||
className: 'channel-profile-avatar channel-thread-header-avatar',
|
||||
className: 'channel-profile-avatar channel-thread-header-avatar avatar-plain',
|
||||
title,
|
||||
alt: 'Аватар канала',
|
||||
});
|
||||
@@ -1916,7 +1916,7 @@ export function render({ navigate, route, chrome }) {
|
||||
avatar: (avatarAr || avatarSha256) ? { ar: avatarAr, sha256Hex: avatarSha256 } : null,
|
||||
authorLogin: node?.authorLogin,
|
||||
size: 'xl',
|
||||
className: 'channel-profile-avatar thread-comment__avatar',
|
||||
className: 'channel-profile-avatar thread-comment__avatar avatar-plain',
|
||||
title,
|
||||
alt: 'Аватар канала',
|
||||
});
|
||||
@@ -2029,7 +2029,7 @@ export function render({ navigate, route, chrome }) {
|
||||
avatar: (avatarAr || avatarSha256) ? { ar: avatarAr, sha256Hex: avatarSha256 } : null,
|
||||
authorLogin: item.author,
|
||||
size: 'xl',
|
||||
className: 'channel-profile-avatar',
|
||||
className: 'channel-profile-avatar avatar-plain',
|
||||
title,
|
||||
alt: 'Аватар канала',
|
||||
});
|
||||
@@ -2065,7 +2065,7 @@ export function render({ navigate, route, chrome }) {
|
||||
if (state.session.isAuthorized) {
|
||||
// Строка ответа как в Threads: аватар, «Ответьте …», прикрепить, развернуть – всё ведёт в общий редактор.
|
||||
open.className = 'thread-reply-bar';
|
||||
const me = renderUserAvatar({ login: state.session.login, size: 'xs', className: 'thread-reply-bar__avatar' });
|
||||
const me = renderUserAvatar({ login: state.session.login, size: 'xs', className: 'thread-reply-bar__avatar avatar-plain' });
|
||||
const field = document.createElement('button');
|
||||
field.type = 'button';
|
||||
field.className = 'thread-reply-bar__field';
|
||||
|
||||
@@ -642,7 +642,7 @@ function createChannelAvatarElement(channel, size = 96) {
|
||||
avatar: (txId || sha256) ? { ar: txId, sha256Hex: sha256 } : null,
|
||||
authorLogin: String(channel?.ownerLogin || '').trim(),
|
||||
size: 'xl',
|
||||
className: 'channel-profile-avatar',
|
||||
className: 'channel-profile-avatar avatar-plain',
|
||||
title,
|
||||
alt: 'Аватар канала',
|
||||
});
|
||||
@@ -2089,7 +2089,7 @@ function renderPostCard(post, {
|
||||
if (post.recentRepliers.length) {
|
||||
const faces = document.createElement('span');
|
||||
faces.className = 'channel-action-faces';
|
||||
post.recentRepliers.forEach((login) => faces.append(renderUserAvatar({ login, size: 'xs', className: 'channel-action-face' })));
|
||||
post.recentRepliers.forEach((login) => faces.append(renderUserAvatar({ login, size: 'xs', className: 'channel-action-face avatar-plain' })));
|
||||
discussionButton.append(faces);
|
||||
}
|
||||
setActionTitle(discussionButton, `Открыть обсуждение, ответов: ${post.repliesCount || 0}`);
|
||||
|
||||
@@ -56,6 +56,7 @@ export function render({ navigate, chrome }) {
|
||||
avatar: card.avatar,
|
||||
size: 'xl',
|
||||
className: 'user-profile-hero-avatar',
|
||||
official: card.accountRole === 'primary',
|
||||
}));
|
||||
|
||||
status.textContent = '';
|
||||
|
||||
@@ -63,6 +63,7 @@ export function render({ navigate, route, chrome }) {
|
||||
avatar: card.avatar,
|
||||
size: 'xl',
|
||||
className: 'user-profile-hero-avatar',
|
||||
official: card.accountRole === 'primary',
|
||||
}));
|
||||
|
||||
status.textContent = '';
|
||||
|
||||
@@ -3,6 +3,8 @@ import { authService, state } from '../state.js';
|
||||
import { loadRelationsForPair, loadUserProfileCard } from '../services/user-connections.js';
|
||||
import { navigateBack } from '../router.js';
|
||||
import { escapeProfileHtml } from '../components/profile-card.js';
|
||||
import { showToast } from '../services/channels-ux.js';
|
||||
import { toUserMessage } from '../services/ui-error-texts.js';
|
||||
|
||||
export const pageMeta = { id: 'user-relation-manage-view', title: 'Добавить связь' };
|
||||
|
||||
@@ -62,12 +64,12 @@ function socialButtonsHtml(flags = {}) {
|
||||
</button>`).join('');
|
||||
}
|
||||
|
||||
function officialBlockHtml(flags = {}) {
|
||||
function officialBlockHtml(flags = {}, targetIsOfficial = false) {
|
||||
return `
|
||||
<section class="card stack relation-manage-card relation-manage-card--official">
|
||||
<div class="relation-manage-card-head">
|
||||
<strong>Основной аккаунт</strong>
|
||||
<span>Этот аккаунт — основной</span>
|
||||
<span>${targetIsOfficial ? 'Этот аккаунт отмечен как основной' : 'Подтвердите, если это основной аккаунт этого человека'}</span>
|
||||
</div>
|
||||
<div class="relation-manage-confirmations">
|
||||
${flags.outOfficialAccount ? '<div class="relation-manage-confirmation">✓ Вы подтвердили его основной аккаунт</div>' : ''}
|
||||
@@ -79,12 +81,12 @@ function officialBlockHtml(flags = {}) {
|
||||
</section>`;
|
||||
}
|
||||
|
||||
function shineBlockHtml(flags = {}) {
|
||||
function shineBlockHtml(flags = {}, targetIsShining = false) {
|
||||
return `
|
||||
<section class="card stack relation-manage-card relation-manage-card--shine">
|
||||
<div class="relation-manage-card-head">
|
||||
<strong>Сияющий</strong>
|
||||
<span>Этот аккаунт — сияющий</span>
|
||||
<span>${targetIsShining ? 'Этот человек отмечен как сияющий' : 'Подтвердите, если считаете этого человека сияющим'}</span>
|
||||
</div>
|
||||
<div class="relation-manage-confirmations">
|
||||
${flags.outShineConfirmed ? '<div class="relation-manage-confirmation">✓ Вы подтверждаете его сияющим</div>' : ''}
|
||||
@@ -152,8 +154,11 @@ export function render({ route, chrome }) {
|
||||
}
|
||||
|
||||
function renderBody() {
|
||||
const canPrimary = selfCard?.accountRole === 'primary' && targetCard?.accountRole === 'primary';
|
||||
const canShine = selfCard?.shineStatus === 'shining' && targetCard?.shineStatus === 'shining';
|
||||
// Те же правила, что проверяет сервер (validateConnectionVotingRights): голосует основной аккаунт,
|
||||
// за сияние – основной и сам сияющий; цель не должна отказываться от подтверждений.
|
||||
const selfPrimary = selfCard?.accountRole === 'primary';
|
||||
const canPrimary = selfPrimary && targetCard?.accountRole !== 'non_voting';
|
||||
const canShine = selfPrimary && selfCard?.shineStatus === 'shining' && targetCard?.shineStatus !== 'not_interested';
|
||||
|
||||
body.innerHTML = `
|
||||
<section class="card stack relation-manage-card relation-manage-card--social">
|
||||
@@ -166,26 +171,36 @@ export function render({ route, chrome }) {
|
||||
${socialButtonsHtml(flags)}
|
||||
</div>
|
||||
</section>
|
||||
${canPrimary ? officialBlockHtml(flags) : ''}
|
||||
${canShine ? shineBlockHtml(flags) : ''}
|
||||
${canPrimary ? officialBlockHtml(flags, targetCard?.accountRole === 'primary') : ''}
|
||||
${canShine ? shineBlockHtml(flags, targetCard?.shineStatus === 'shining') : ''}
|
||||
`;
|
||||
}
|
||||
|
||||
async function refresh({ loading = true } = {}) {
|
||||
if (loading) {
|
||||
status.className = 'status-line relation-manage-status';
|
||||
status.textContent = 'Загрузка...';
|
||||
}
|
||||
// «Загрузка…» – только если ответ задержался, иначе строка мелькает и сдвигает экран.
|
||||
const loadingTimer = loading ? window.setTimeout(() => {
|
||||
if (screen.isConnected && !body.childElementCount) status.textContent = 'Загрузка…';
|
||||
}, 500) : 0;
|
||||
[selfCard, targetCard, flags] = await Promise.all([
|
||||
loadUserProfileCard(selfLogin),
|
||||
loadUserProfileCard(targetLogin),
|
||||
loadRelationsForPair({ currentLogin: selfLogin, targetLogin }),
|
||||
]);
|
||||
window.clearTimeout(loadingTimer);
|
||||
renderBody();
|
||||
status.className = 'status-line relation-manage-status';
|
||||
status.textContent = '';
|
||||
}
|
||||
|
||||
const SOCIAL_DONE = {
|
||||
none: 'Связь убрана',
|
||||
contact: 'Добавлен в контакты',
|
||||
friend: 'Добавлен в друзья',
|
||||
close_friend: 'Добавлен в близкие друзья',
|
||||
};
|
||||
|
||||
// Выбор сохраняется прямо на нажатой кнопке (без строки статуса, которая сдвигала экран),
|
||||
// после сохранения – короткое сообщение и возврат на страницу пользователя.
|
||||
body.addEventListener('click', async (event) => {
|
||||
const button = event.target.closest('button');
|
||||
if (!button || busy) return;
|
||||
@@ -193,24 +208,36 @@ export function render({ route, chrome }) {
|
||||
const social = button.dataset.socialKind;
|
||||
const confirm = button.dataset.confirm;
|
||||
if (!social && !confirm) return;
|
||||
if (social && effectiveSocial(flags, 'out') === social) { navigateBack(); return; }
|
||||
|
||||
busy = true;
|
||||
body.classList.add('is-busy');
|
||||
status.className = 'status-line relation-manage-status';
|
||||
status.textContent = 'Сохранение...';
|
||||
body.querySelectorAll('button').forEach((item) => { item.disabled = true; });
|
||||
const label = button.textContent;
|
||||
button.classList.add('is-pending');
|
||||
button.textContent = 'Сохраняем…';
|
||||
|
||||
try {
|
||||
let done = '';
|
||||
if (social) {
|
||||
await changeSocial(social);
|
||||
done = SOCIAL_DONE[social] || 'Связь сохранена';
|
||||
} else if (confirm === 'official_account') {
|
||||
await setKind('official_account', !flags.outOfficialAccount);
|
||||
done = flags.outOfficialAccount ? 'Подтверждение убрано' : 'Вы подтвердили официальный аккаунт';
|
||||
} else if (confirm === 'shine_confirmed') {
|
||||
await setKind('shine_confirmed', !flags.outShineConfirmed);
|
||||
done = flags.outShineConfirmed ? 'Подтверждение убрано' : 'Вы подтвердили сияние';
|
||||
}
|
||||
await refresh({ loading: false });
|
||||
if (!screen.isConnected) return;
|
||||
showToast(done);
|
||||
navigateBack();
|
||||
} catch (error) {
|
||||
status.className = 'status-line relation-manage-status is-unavailable';
|
||||
status.textContent = `Ошибка: ${error?.message || 'Не удалось изменить связь'}`;
|
||||
if (!screen.isConnected) return;
|
||||
showToast(toUserMessage(error, 'Не удалось изменить связь'), { kind: 'error', timeoutMs: 4000 });
|
||||
button.textContent = label;
|
||||
button.classList.remove('is-pending');
|
||||
body.querySelectorAll('button').forEach((item) => { item.disabled = false; });
|
||||
} finally {
|
||||
busy = false;
|
||||
body.classList.remove('is-busy');
|
||||
|
||||
@@ -6,57 +6,6 @@
|
||||
.user-profile-screen .user-profile-status:empty { display: none; }
|
||||
|
||||
.user-profile-screen .pf-hero { display: grid; justify-items: center; gap: var(--space-1); text-align: center; }
|
||||
.user-profile-screen .pf-identity {
|
||||
width: min(100%, 420px);
|
||||
display: grid;
|
||||
grid-template-columns: minmax(72px, 1fr) 96px minmax(72px, 1fr);
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
.user-profile-screen .pf-status-card-slot { min-width: 0; display: grid; align-items: center; }
|
||||
.user-profile-screen .pf-status-card-slot--left { justify-items: end; }
|
||||
.user-profile-screen .pf-status-card-slot--right { justify-items: start; }
|
||||
.user-profile-screen .pf-status-card {
|
||||
width: min(100%, 106px);
|
||||
aspect-ratio: 1;
|
||||
display: grid;
|
||||
grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
|
||||
border: 1px solid var(--border-subtle);
|
||||
border-radius: var(--radius-lg);
|
||||
background: var(--surface);
|
||||
overflow: hidden;
|
||||
}
|
||||
.user-profile-screen .pf-status-card--primary { border-color: color-mix(in srgb, var(--rel-family) 55%, var(--border-subtle)); }
|
||||
.user-profile-screen .pf-status-card--shine { border-color: color-mix(in srgb, var(--rel-shining) 55%, var(--border-subtle)); }
|
||||
.user-profile-screen .pf-status-card-title {
|
||||
min-height: 27px;
|
||||
padding: 7px 5px 5px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
color: var(--text-primary);
|
||||
font-size: 11px;
|
||||
line-height: 1.1;
|
||||
font-weight: var(--weight-bold);
|
||||
}
|
||||
.user-profile-screen .pf-status-card-count {
|
||||
min-width: 0;
|
||||
padding: 3px 2px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
align-content: center;
|
||||
gap: 0;
|
||||
border: 0;
|
||||
border-top: 1px solid var(--border-subtle);
|
||||
background: transparent;
|
||||
color: var(--text-primary);
|
||||
font: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
.user-profile-screen .pf-status-card-count:hover,
|
||||
.user-profile-screen .pf-status-card-count:active { background: var(--surface-selected); }
|
||||
.user-profile-screen .pf-status-card-count:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
|
||||
.user-profile-screen .pf-status-card-count strong { font-size: var(--text-md); line-height: 1.05; font-weight: var(--weight-bold); }
|
||||
.user-profile-screen .pf-status-card-count span { color: var(--text-secondary); font-size: 9px; line-height: 1.05; }
|
||||
.user-profile-screen .pf-avatar { position: relative; width: 96px; height: 96px; display: grid; place-items: center; justify-self: center; }
|
||||
.user-profile-screen .pf-avatar .user-profile-hero-avatar.avatar,
|
||||
.user-profile-screen .pf-avatar .user-profile-hero-avatar.avatar-image { width: 96px; height: 96px; min-width: 96px; min-height: 96px; font-size: 36px; }
|
||||
@@ -64,17 +13,45 @@
|
||||
.user-profile-screen .pf-avatar .user-profile-hero-avatar.avatar-framed > .avatar-photo { width: 100%; height: 100%; }
|
||||
.user-profile-screen .pf-avatar .user-profile-hero-avatar.avatar-framed::after,
|
||||
.user-profile-screen .pf-avatar .user-profile-hero-avatar.avatar-glow::before { content: none; }
|
||||
/* Сияющий: тёплая золотая аура вокруг аватара, медленно «дышит» – как сияние знака на заставке. */
|
||||
.user-profile-screen .pf-avatar.is-shining { isolation: isolate; }
|
||||
.user-profile-screen .pf-avatar.is-shining::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: -30%;
|
||||
z-index: -1;
|
||||
border-radius: 50%;
|
||||
background: radial-gradient(closest-side, color-mix(in srgb, var(--warning) 46%, transparent) 55%, color-mix(in srgb, var(--warning) 16%, transparent) 78%, transparent);
|
||||
filter: blur(8px);
|
||||
animation: pf-shine-breathe 5.3s ease-in-out infinite;
|
||||
pointer-events: none;
|
||||
}
|
||||
.user-profile-screen .pf-avatar.is-shining .user-profile-hero-avatar { box-shadow: 0 0 0 2px color-mix(in srgb, var(--warning) 85%, transparent); border-radius: 50%; }
|
||||
@keyframes pf-shine-breathe {
|
||||
0%, 100% { opacity: 0.7; transform: scale(0.96); }
|
||||
50% { opacity: 1; transform: scale(1.04); }
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) { .user-profile-screen .pf-avatar.is-shining::before { animation: none; } }
|
||||
|
||||
.user-profile-screen .pf-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-1); margin-top: var(--space-1); }
|
||||
.user-profile-screen .pf-badge {
|
||||
padding: 3px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: var(--text-xs);
|
||||
line-height: var(--leading-xs);
|
||||
font-weight: var(--weight-bold);
|
||||
}
|
||||
.user-profile-screen .pf-badge--shine { color: var(--warning); background: color-mix(in srgb, var(--warning) 14%, transparent); }
|
||||
.user-profile-screen .pf-badge--official { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
|
||||
.user-profile-screen .pf-status-section .nav-list__title { margin-top: 0; }
|
||||
|
||||
.user-profile-screen .pf-name { margin: var(--space-2) 0 0; color: var(--text-primary); font-size: var(--text-xl); line-height: var(--leading-xl); font-weight: var(--weight-bold); overflow-wrap: anywhere; }
|
||||
.user-profile-screen .pf-login { color: var(--text-secondary); font-size: var(--text-sm); line-height: var(--leading-sm); }
|
||||
|
||||
@media (max-width: 360px) {
|
||||
.user-profile-screen .pf-identity { grid-template-columns: minmax(66px, 1fr) 88px minmax(66px, 1fr); gap: 7px; }
|
||||
.user-profile-screen .pf-avatar,
|
||||
.user-profile-screen .pf-avatar .user-profile-hero-avatar.avatar,
|
||||
.user-profile-screen .pf-avatar .user-profile-hero-avatar.avatar-image { width: 88px; height: 88px; min-width: 88px; min-height: 88px; }
|
||||
.user-profile-screen .pf-status-card { width: min(100%, 96px); }
|
||||
.user-profile-screen .pf-status-card-title { font-size: 10px; }
|
||||
.user-profile-screen .pf-status-card-count span { font-size: 8px; }
|
||||
}
|
||||
|
||||
.user-profile-screen .pf-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
|
||||
@@ -144,7 +121,9 @@
|
||||
.relation-manage-screen { gap: var(--space-3); }
|
||||
.relation-manage-status:empty { display: none; }
|
||||
.relation-manage-body { gap: var(--space-3); }
|
||||
.relation-manage-body.is-busy { opacity: .72; pointer-events: none; }
|
||||
.relation-manage-body.is-busy { pointer-events: none; }
|
||||
.relation-manage-body.is-busy button:not(.is-pending) { opacity: .5; }
|
||||
.relation-manage-body button.is-pending { border-color: var(--accent); color: var(--accent); opacity: 1; }
|
||||
.relation-manage-card { gap: var(--space-3); }
|
||||
.relation-manage-card-head { display: grid; gap: 2px; }
|
||||
.relation-manage-card-head > strong { color: var(--text-primary); font-size: var(--text-md); }
|
||||
|
||||
@@ -760,8 +760,6 @@
|
||||
|
||||
|
||||
.user-profile-avatar-slot {
|
||||
grid-column: 2;
|
||||
grid-row: 1 / 3;
|
||||
width: var(--user-profile-avatar-size);
|
||||
height: var(--user-profile-avatar-size);
|
||||
display: grid;
|
||||
|
||||
Reference in New Issue
Block a user