SHA256
UI: полировка после обхода – аватары каналов одной формы, аватары без кольца на краю экрана
- Список каналов: аватары – скруглённый квадрат, как в ленте и шапке канала (люди – круг). - Создание канала и редактирование профиля: аватар без стеклянного кольца, которое вылезало за край. - Ответ на запись канала обращается к каналу по названию («Ответьте Утренние истины…»).
This commit is contained in:
@@ -46,7 +46,7 @@ function renderAvatarPreview(slot, avatar, title) {
|
||||
avatar,
|
||||
authorLogin: state.session.login,
|
||||
size: 'xl',
|
||||
className: 'channel-profile-avatar',
|
||||
className: 'channel-profile-avatar avatar-plain',
|
||||
title: label,
|
||||
alt: 'Аватар канала',
|
||||
});
|
||||
|
||||
@@ -2072,6 +2072,13 @@ export function render({ navigate, route, chrome }) {
|
||||
}
|
||||
return item;
|
||||
};
|
||||
// Запись канала показывается от имени канала – и обращаемся к ней по названию канала.
|
||||
const replyTargetName = (node) => {
|
||||
const rootNode = ancestors.length ? ancestors[0] : focus;
|
||||
const byOwner = Boolean(selector?.channel?.ownerBlockchainName)
|
||||
&& String(node?.authorBlockchainName || '').toLowerCase() === String(selector.channel.ownerBlockchainName).toLowerCase();
|
||||
return node === rootNode && byOwner ? title : String(node?.authorLogin || '');
|
||||
};
|
||||
replyEditorOpener = (node, { attach = false } = {}) => {
|
||||
if (!node || disposed) return;
|
||||
const path = [];
|
||||
@@ -2081,7 +2088,7 @@ export function render({ navigate, route, chrome }) {
|
||||
id: 'thread-reply-modal',
|
||||
title: 'Ответ',
|
||||
submitLabel: 'Ответить',
|
||||
placeholder: `Ответить ${node.authorLogin || ''}…`,
|
||||
placeholder: `Ответить ${replyTargetName(node)}…`,
|
||||
context: { chain },
|
||||
key: `thread-reply:${nodeKey(node)}`,
|
||||
openAttachOnStart: attach,
|
||||
@@ -2104,7 +2111,7 @@ export function render({ navigate, route, chrome }) {
|
||||
const field = document.createElement('button');
|
||||
field.type = 'button';
|
||||
field.className = 'thread-reply-bar__field';
|
||||
field.textContent = `Ответьте ${focus.authorLogin || ''}…`;
|
||||
field.textContent = `Ответьте ${replyTargetName(focus)}…`;
|
||||
field.addEventListener('click', () => replyEditorOpener(focus));
|
||||
const attach = document.createElement('button');
|
||||
attach.type = 'button';
|
||||
|
||||
@@ -241,7 +241,8 @@ export function render({ navigate, chrome }) {
|
||||
? { ar: String(currentAvatar.txId || currentAvatar.ar || '').trim(), sha256Hex: String(currentAvatar?.sha256Hex || '').trim().toLowerCase() }
|
||||
: null,
|
||||
size: 'xl',
|
||||
className: 'profile-avatar',
|
||||
// Как в карточке профиля: без стеклянного кольца, которое вылезало за край экрана.
|
||||
className: 'profile-avatar avatar-plain',
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user