Стандартизировали размеры аватаров в UI

This commit is contained in:
AidarKC
2026-08-26 12:33:18 +04:00
parent 83f87ba22c
commit 2a65e6d359
15 changed files with 134 additions and 84 deletions
+5 -5
View File
@@ -86,7 +86,7 @@ function createMessageAvatar(login) {
const title = cleanLogin ? `Профиль ${cleanLogin}` : '';
const avatarEl = renderUserAvatar({
login: cleanLogin || 'unknown',
size: 'small',
size: 'sm',
className: 'channel-message-avatar',
title,
});
@@ -101,7 +101,7 @@ function createMessageAvatar(login) {
sha256Hex: String(snapshot?.avatar?.sha256Hex || '').trim().toLowerCase(),
}
: null,
size: 'small',
size: 'sm',
className: 'channel-message-avatar',
title,
});
@@ -577,13 +577,13 @@ function getStatusActionOptionsForTarget(targetMsgSubType) {
}
}
function createChannelAvatarElement(channel, size = 72) {
function createChannelAvatarElement(channel, size = 96) {
const txId = String(channel?.avaAr || '').trim();
const title = String(channel?.displayTitle || channel?.name || 'К').trim() || 'К';
const wrap = renderAvatar({
initials: title.slice(0, 1).toUpperCase() || 'К',
avatar: txId ? { ar: txId } : null,
size: 'small',
size: 'xl',
className: 'channel-profile-avatar',
title,
alt: 'Аватар канала',
@@ -626,7 +626,7 @@ function openChannelMetaDetailsModal({
</div>
</div>
`;
root.querySelector('#about-channel-avatar-slot')?.append(createChannelAvatarElement(channel, 86));
root.querySelector('#about-channel-avatar-slot')?.append(createChannelAvatarElement(channel, 96));
root.querySelector('#about-channel-close')?.addEventListener('click', () => {
root.innerHTML = '';