SHA256
UI: четыре кнопки как в Threads, строка ответа и редактор по их образцу
Под записями и ответами – лайк, ответы, репост, поделиться. Репост в блокчейне ещё дорабатывается: кнопка на месте и пока сообщает «Репосты скоро появятся» (переключатель REPOSTS_ENABLED в channels-ux.js). Строка ответа внизу обсуждения: аватар, «Ответьте …», «фото/файл» (редактор сразу с выбором файла) и «развернуть». Редактор: текст пишется прямо под именем, без рамки; под текстом – иконка вложения и «Очистить черновик»; внизу – счётчик и кнопка отправки.
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
|||||||
client.version=1.18.3
|
client.version=1.18.4
|
||||||
server.version=1.14.0
|
server.version=1.14.0
|
||||||
|
|||||||
+1
-1
@@ -39,7 +39,7 @@
|
|||||||
}());
|
}());
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
window.__SHINE_BUILD_HASH__ = '20261011224500';
|
window.__SHINE_BUILD_HASH__ = '20261011233000';
|
||||||
window.__SHINE_CLIENT_VERSION__ = '1.2.10';
|
window.__SHINE_CLIENT_VERSION__ = '1.2.10';
|
||||||
</script>
|
</script>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ export function openChannelEditor({
|
|||||||
allowEmptyText = false,
|
allowEmptyText = false,
|
||||||
allowAttachments = true,
|
allowAttachments = true,
|
||||||
rawText = false,
|
rawText = false,
|
||||||
|
openAttachOnStart = false,
|
||||||
onSubmit,
|
onSubmit,
|
||||||
isActive = () => true,
|
isActive = () => true,
|
||||||
} = {}) {
|
} = {}) {
|
||||||
@@ -180,16 +181,23 @@ export function openChannelEditor({
|
|||||||
author.append(authorText);
|
author.append(authorText);
|
||||||
if (chain.length) author.classList.add('is-chained');
|
if (chain.length) author.classList.add('is-chained');
|
||||||
body.append(author);
|
body.append(author);
|
||||||
body.append(textarea, attachmentsBox, error, clearButton);
|
|
||||||
|
|
||||||
const footer = document.createElement('footer');
|
const footer = document.createElement('footer');
|
||||||
footer.className = 'channel-editor__footer';
|
footer.className = 'channel-editor__footer';
|
||||||
const attachButton = document.createElement('button');
|
const attachButton = document.createElement('button');
|
||||||
attachButton.type = 'button';
|
attachButton.type = 'button';
|
||||||
attachButton.className = 'secondary-btn channel-editor__attach';
|
attachButton.className = 'icon-btn channel-editor__attach';
|
||||||
attachButton.innerHTML = `${iconHtml('clip')}<span class="sr-only">Прикрепить</span>`;
|
attachButton.innerHTML = `${iconHtml('image')}<span class="sr-only">Прикрепить фото, видео или файл</span>`;
|
||||||
attachButton.title = 'Прикрепить файл';
|
attachButton.title = 'Фото, видео или файл';
|
||||||
attachButton.hidden = !allowAttachments;
|
attachButton.hidden = !allowAttachments;
|
||||||
|
// Как в Threads: текст пишется прямо под именем, без рамки; под ним – вложения и иконка «прикрепить».
|
||||||
|
const compose = document.createElement('div');
|
||||||
|
compose.className = 'channel-editor__compose';
|
||||||
|
const tools = document.createElement('div');
|
||||||
|
tools.className = 'channel-editor__tools';
|
||||||
|
tools.append(attachButton, clearButton);
|
||||||
|
compose.append(textarea, attachmentsBox, tools, error);
|
||||||
|
body.append(compose);
|
||||||
const counter = document.createElement('span');
|
const counter = document.createElement('span');
|
||||||
counter.className = 'channel-editor__counter';
|
counter.className = 'channel-editor__counter';
|
||||||
const submitButton = document.createElement('button');
|
const submitButton = document.createElement('button');
|
||||||
@@ -197,7 +205,6 @@ export function openChannelEditor({
|
|||||||
submitButton.className = 'primary-btn channel-editor__submit';
|
submitButton.className = 'primary-btn channel-editor__submit';
|
||||||
submitButton.textContent = submitLabel;
|
submitButton.textContent = submitLabel;
|
||||||
submitButton.title = 'Отправить · Ctrl+Enter / ⌘+Enter';
|
submitButton.title = 'Отправить · Ctrl+Enter / ⌘+Enter';
|
||||||
footer.append(attachButton);
|
|
||||||
if (extraControl instanceof Node) {
|
if (extraControl instanceof Node) {
|
||||||
footer.classList.add('has-extra');
|
footer.classList.add('has-extra');
|
||||||
footer.append(extraControl);
|
footer.append(extraControl);
|
||||||
@@ -216,7 +223,7 @@ export function openChannelEditor({
|
|||||||
|
|
||||||
const sync = () => {
|
const sync = () => {
|
||||||
textarea.style.height = 'auto';
|
textarea.style.height = 'auto';
|
||||||
textarea.style.height = `${Math.max(160, textarea.scrollHeight)}px`;
|
textarea.style.height = `${Math.max(48, textarea.scrollHeight)}px`;
|
||||||
const length = textarea.value.length;
|
const length = textarea.value.length;
|
||||||
counter.textContent = `${length} / 2000`;
|
counter.textContent = `${length} / 2000`;
|
||||||
counter.classList.toggle('is-near-limit', length >= 1800);
|
counter.classList.toggle('is-near-limit', length >= 1800);
|
||||||
@@ -409,6 +416,7 @@ export function openChannelEditor({
|
|||||||
sync();
|
sync();
|
||||||
if (chain.length) body.scrollTop = author.offsetTop - body.offsetTop - 120;
|
if (chain.length) body.scrollTop = author.offsetTop - body.offsetTop - 120;
|
||||||
textarea.focus({ preventScroll: chain.length > 0 });
|
textarea.focus({ preventScroll: chain.length > 0 });
|
||||||
|
if (openAttachOnStart && allowAttachments) attachButton.click();
|
||||||
textarea.setSelectionRange(textarea.value.length, textarea.value.length);
|
textarea.setSelectionRange(textarea.value.length, textarea.value.length);
|
||||||
});
|
});
|
||||||
return { close };
|
return { close };
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ const paths = {
|
|||||||
refresh: '<path d="M20 12a8 8 0 1 1-2.3-5.6"/><path d="M20 4v4.4h-4.4"/>',
|
refresh: '<path d="M20 12a8 8 0 1 1-2.3-5.6"/><path d="M20 4v4.4h-4.4"/>',
|
||||||
eye: '<path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"/><circle cx="12" cy="12" r="3"/>',
|
eye: '<path d="M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z"/><circle cx="12" cy="12" r="3"/>',
|
||||||
eyeOff: '<path d="M10.2 5.7A9.6 9.6 0 0 1 12 5.5c6 0 9.5 6.5 9.5 6.5a16.4 16.4 0 0 1-2.6 3.4M6.4 7A16.2 16.2 0 0 0 2.5 12S6 18.5 12 18.5a9 9 0 0 0 4.9-1.4"/><path d="M9.9 9.9a3 3 0 0 0 4.2 4.2M3.5 3.5l17 17"/>',
|
eyeOff: '<path d="M10.2 5.7A9.6 9.6 0 0 1 12 5.5c6 0 9.5 6.5 9.5 6.5a16.4 16.4 0 0 1-2.6 3.4M6.4 7A16.2 16.2 0 0 0 2.5 12S6 18.5 12 18.5a9 9 0 0 0 4.9-1.4"/><path d="M9.9 9.9a3 3 0 0 0 4.2 4.2M3.5 3.5l17 17"/>',
|
||||||
|
repost: '<path d="M17 2.5 20.5 6 17 9.5"/><path d="M3.5 11.5V9a3 3 0 0 1 3-3h14"/><path d="M7 21.5 3.5 18 7 14.5"/><path d="M20.5 12.5V15a3 3 0 0 1-3 3h-14"/>',
|
||||||
|
expand: '<path d="M14 4h6v6M10 20H4v-6M20 4l-6.5 6.5M4 20l6.5-6.5"/>',
|
||||||
clip: '<path d="m20.5 11.5-8.2 8.2a5 5 0 0 1-7.1-7.1l8.5-8.5a3.3 3.3 0 0 1 4.7 4.7l-8.5 8.5a1.7 1.7 0 0 1-2.4-2.4l7.8-7.8"/>',
|
clip: '<path d="m20.5 11.5-8.2 8.2a5 5 0 0 1-7.1-7.1l8.5-8.5a3.3 3.3 0 0 1 4.7 4.7l-8.5 8.5a1.7 1.7 0 0 1-2.4-2.4l7.8-7.8"/>',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import {
|
|||||||
formatPostStamp,
|
formatPostStamp,
|
||||||
formatShortAge,
|
formatShortAge,
|
||||||
formatRelativeTime,
|
formatRelativeTime,
|
||||||
|
notifyRepostSoon,
|
||||||
|
REPOSTS_ENABLED,
|
||||||
longPressFeel,
|
longPressFeel,
|
||||||
shareOrCopyLink,
|
shareOrCopyLink,
|
||||||
showToast,
|
showToast,
|
||||||
@@ -932,7 +934,20 @@ function renderNodeCard(node, heading, handlers, localNumber, { focusPost = fals
|
|||||||
else handlers.onOpenThread(target);
|
else handlers.onOpenThread(target);
|
||||||
});
|
});
|
||||||
// Тот же вид и порядок кнопок, что в ленте канала.
|
// Тот же вид и порядок кнопок, что в ленте канала.
|
||||||
if (threadsLayout) actions.append(likeButton, discussionButton, shareButton);
|
const repostButton = document.createElement('button');
|
||||||
|
repostButton.type = 'button';
|
||||||
|
repostButton.className = 'ui-button channel-action-item channel-action-repost';
|
||||||
|
repostButton.innerHTML = `
|
||||||
|
<span class="channel-action-icon" aria-hidden="true">${iconHtml('repost')}</span>
|
||||||
|
<span class="channel-action-label">Репост</span>
|
||||||
|
`;
|
||||||
|
setActionTitle(repostButton, 'Репост');
|
||||||
|
repostButton.addEventListener('click', (event) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
if (!REPOSTS_ENABLED) { notifyRepostSoon(); return; }
|
||||||
|
void handlers.onRepost?.(target);
|
||||||
|
});
|
||||||
|
if (threadsLayout) actions.append(likeButton, discussionButton, repostButton, shareButton);
|
||||||
else actions.append(likeButton, shareButton, discussionButton);
|
else actions.append(likeButton, shareButton, discussionButton);
|
||||||
menuItems.unshift({ label: 'Ответить', iconHtml: iconHtml('reply'), action: () => replyButton.click() });
|
menuItems.unshift({ label: 'Ответить', iconHtml: iconHtml('reply'), action: () => replyButton.click() });
|
||||||
// Те же действия, что у ответов в обсуждении.
|
// Те же действия, что у ответов в обсуждении.
|
||||||
@@ -1189,8 +1204,15 @@ function renderComment({ node, parent, focus, channelOwner, handlers, nested = f
|
|||||||
share.setAttribute('aria-label', 'Поделиться комментарием');
|
share.setAttribute('aria-label', 'Поделиться комментарием');
|
||||||
share.addEventListener('click', () => handlers.shareComment(node));
|
share.addEventListener('click', () => handlers.shareComment(node));
|
||||||
|
|
||||||
// Ряд действий как у записи канала: лайк, ответы, поделиться.
|
const repost = document.createElement('button');
|
||||||
actions.append(like, reply, share);
|
repost.type = 'button';
|
||||||
|
repost.className = 'channel-action-item thread-comment__repost';
|
||||||
|
repost.innerHTML = iconHtml('repost');
|
||||||
|
repost.setAttribute('aria-label', 'Репост');
|
||||||
|
repost.addEventListener('click', () => (REPOSTS_ENABLED ? handlers.onRepost?.(target) : notifyRepostSoon()));
|
||||||
|
|
||||||
|
// Ряд действий как у записи канала: лайк, ответы, репост, поделиться.
|
||||||
|
actions.append(like, reply, repost, share);
|
||||||
main.append(actions);
|
main.append(actions);
|
||||||
item.append(who, main);
|
item.append(who, main);
|
||||||
// Как в Threads: нажатие на ответ открывает его обсуждение (кнопки, ссылки и вложения работают сами по себе).
|
// Как в Threads: нажатие на ответ открывает его обсуждение (кнопки, ссылки и вложения работают сами по себе).
|
||||||
@@ -1993,7 +2015,7 @@ export function render({ navigate, route, chrome }) {
|
|||||||
}
|
}
|
||||||
return item;
|
return item;
|
||||||
};
|
};
|
||||||
replyEditorOpener = (node) => {
|
replyEditorOpener = (node, { attach = false } = {}) => {
|
||||||
if (!node || disposed) return;
|
if (!node || disposed) return;
|
||||||
const path = [];
|
const path = [];
|
||||||
for (let cur = node; cur && cur !== focus; cur = parentByKey.get(nodeKey(cur))) path.unshift(cur);
|
for (let cur = node; cur && cur !== focus; cur = parentByKey.get(nodeKey(cur))) path.unshift(cur);
|
||||||
@@ -2005,6 +2027,7 @@ export function render({ navigate, route, chrome }) {
|
|||||||
placeholder: `Ответить ${node.authorLogin || ''}…`,
|
placeholder: `Ответить ${node.authorLogin || ''}…`,
|
||||||
context: { chain },
|
context: { chain },
|
||||||
key: `thread-reply:${nodeKey(node)}`,
|
key: `thread-reply:${nodeKey(node)}`,
|
||||||
|
openAttachOnStart: attach,
|
||||||
isActive: () => !disposed,
|
isActive: () => !disposed,
|
||||||
onSubmit: ({ text }) => handlers.onReply(buildTargetFromNode(node), text),
|
onSubmit: ({ text }) => handlers.onReply(buildTargetFromNode(node), text),
|
||||||
});
|
});
|
||||||
@@ -2016,17 +2039,37 @@ export function render({ navigate, route, chrome }) {
|
|||||||
if (focus) {
|
if (focus) {
|
||||||
const bar = document.createElement('div');
|
const bar = document.createElement('div');
|
||||||
bar.className = 'channel-composer thread-composer';
|
bar.className = 'channel-composer thread-composer';
|
||||||
const open = document.createElement('button');
|
const open = document.createElement('div');
|
||||||
open.type = 'button';
|
|
||||||
if (state.session.isAuthorized) {
|
if (state.session.isAuthorized) {
|
||||||
open.className = 'channel-compose-bar';
|
// Строка ответа как в Threads: аватар, «Ответьте …», прикрепить, развернуть – всё ведёт в общий редактор.
|
||||||
open.innerHTML = `<span class="channel-compose-bar__text"></span><span class="channel-compose-bar__icon" aria-hidden="true">${iconHtml('send')}</span>`;
|
open.className = 'thread-reply-bar';
|
||||||
open.querySelector('.channel-compose-bar__text').textContent = `Ответить ${focus.authorLogin || ''}…`;
|
const me = renderUserAvatar({ login: state.session.login, size: 'xs', className: 'thread-reply-bar__avatar' });
|
||||||
open.addEventListener('click', () => replyEditorOpener(focus));
|
const field = document.createElement('button');
|
||||||
|
field.type = 'button';
|
||||||
|
field.className = 'thread-reply-bar__field';
|
||||||
|
field.textContent = `Ответьте ${focus.authorLogin || ''}…`;
|
||||||
|
field.addEventListener('click', () => replyEditorOpener(focus));
|
||||||
|
const attach = document.createElement('button');
|
||||||
|
attach.type = 'button';
|
||||||
|
attach.className = 'thread-reply-bar__icon';
|
||||||
|
attach.innerHTML = iconHtml('image');
|
||||||
|
attach.setAttribute('aria-label', 'Ответ с фото, видео или файлом');
|
||||||
|
attach.addEventListener('click', () => replyEditorOpener(focus, { attach: true }));
|
||||||
|
const expand = document.createElement('button');
|
||||||
|
expand.type = 'button';
|
||||||
|
expand.className = 'thread-reply-bar__icon';
|
||||||
|
expand.innerHTML = iconHtml('expand');
|
||||||
|
expand.setAttribute('aria-label', 'Открыть редактор ответа');
|
||||||
|
expand.addEventListener('click', () => replyEditorOpener(focus));
|
||||||
|
open.append(me, field, attach, expand);
|
||||||
} else {
|
} else {
|
||||||
open.className = 'primary-btn channel-main-action';
|
const loginBtn = document.createElement('button');
|
||||||
open.textContent = 'Войти, чтобы ответить';
|
loginBtn.type = 'button';
|
||||||
open.addEventListener('click', () => { state.authReturnHash = window.location.pathname || '/channels'; navigate('login-view'); });
|
open.append(loginBtn);
|
||||||
|
open.className = 'thread-reply-guest';
|
||||||
|
loginBtn.className = 'primary-btn channel-main-action';
|
||||||
|
loginBtn.textContent = 'Войти, чтобы ответить';
|
||||||
|
loginBtn.addEventListener('click', () => { state.authReturnHash = window.location.pathname || '/channels'; navigate('login-view'); });
|
||||||
}
|
}
|
||||||
bar.append(open);
|
bar.append(open);
|
||||||
chrome?.setComposer(bar);
|
chrome?.setComposer(bar);
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ import {
|
|||||||
formatRelativeTime,
|
formatRelativeTime,
|
||||||
formatShortAge,
|
formatShortAge,
|
||||||
longPressFeel,
|
longPressFeel,
|
||||||
|
notifyRepostSoon,
|
||||||
|
REPOSTS_ENABLED,
|
||||||
shareOrCopyLink,
|
shareOrCopyLink,
|
||||||
showToast,
|
showToast,
|
||||||
softHaptic,
|
softHaptic,
|
||||||
@@ -2165,7 +2167,21 @@ function renderPostCard(post, {
|
|||||||
|
|
||||||
// Порядок как в макете V4: лайк → поделиться → обсуждение; дата и «⋯» — справа.
|
// Порядок как в макете V4: лайк → поделиться → обсуждение; дата и «⋯» — справа.
|
||||||
// В раскладке Threads: лайк → обсуждение → поделиться, дата и «⋯» в шапке.
|
// В раскладке Threads: лайк → обсуждение → поделиться, дата и «⋯» в шапке.
|
||||||
if (threadsLayout) actions.append(likeButton, discussionButton, shareButton);
|
const repostButton = document.createElement('button');
|
||||||
|
repostButton.type = 'button';
|
||||||
|
repostButton.className = 'ui-button channel-action-item channel-action-repost';
|
||||||
|
repostButton.innerHTML = `
|
||||||
|
<span class="channel-action-icon" aria-hidden="true">${iconHtml('repost')}</span>
|
||||||
|
<span class="channel-action-label">Репост</span>
|
||||||
|
`;
|
||||||
|
setActionTitle(repostButton, 'Репост');
|
||||||
|
repostButton.addEventListener('click', (event) => {
|
||||||
|
event.stopPropagation();
|
||||||
|
if (!REPOSTS_ENABLED) { notifyRepostSoon(); return; }
|
||||||
|
void onRepost?.(post.messageRef);
|
||||||
|
});
|
||||||
|
// Четыре кнопки как в Threads: лайк, ответы, репост, поделиться.
|
||||||
|
if (threadsLayout) actions.append(likeButton, discussionButton, repostButton, shareButton);
|
||||||
else actions.append(likeButton, shareButton, discussionButton);
|
else actions.append(likeButton, shareButton, discussionButton);
|
||||||
if (selector?.publicOrdinalUrlsAllowed && post.messageRef?.blockNumber != null) {
|
if (selector?.publicOrdinalUrlsAllowed && post.messageRef?.blockNumber != null) {
|
||||||
const streamRoute = makeShineChannelStreamRoute({
|
const streamRoute = makeShineChannelStreamRoute({
|
||||||
|
|||||||
@@ -292,3 +292,10 @@ export async function longPressFeel(el, delayMs = 130) {
|
|||||||
await new Promise((resolve) => setTimeout(resolve, Math.max(60, Number(delayMs) || 130)));
|
await new Promise((resolve) => setTimeout(resolve, Math.max(60, Number(delayMs) || 130)));
|
||||||
if (node) node.classList.remove('is-long-press');
|
if (node) node.classList.remove('is-long-press');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Репост в блокчейне ещё дорабатывается (обещан скоро) – кнопка уже на месте, как четвёртая в ряду действий.
|
||||||
|
// Когда появится, здесь вызывать настоящий обработчик.
|
||||||
|
export const REPOSTS_ENABLED = false;
|
||||||
|
export function notifyRepostSoon() {
|
||||||
|
showToast('Репосты скоро появятся');
|
||||||
|
}
|
||||||
|
|||||||
@@ -168,31 +168,19 @@
|
|||||||
min-height: calc(68px + env(safe-area-inset-bottom));
|
min-height: calc(68px + env(safe-area-inset-bottom));
|
||||||
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto minmax(0, 1fr) auto;
|
grid-template-columns: minmax(0, 1fr) auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
border-top: 1px solid var(--border-subtle);
|
border-top: 1px solid var(--border-subtle);
|
||||||
background: var(--background);
|
background: var(--background);
|
||||||
}
|
}
|
||||||
|
|
||||||
.channel-editor__attach,
|
|
||||||
.channel-editor__submit {
|
.channel-editor__submit {
|
||||||
min-height: 44px;
|
min-height: 44px;
|
||||||
padding: 0 14px;
|
padding: 0 18px;
|
||||||
border-radius: 12px;
|
border-radius: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.channel-editor__attach {
|
|
||||||
width: 44px;
|
|
||||||
padding: 0;
|
|
||||||
display: inline-grid;
|
|
||||||
place-items: center;
|
|
||||||
color: var(--accent);
|
|
||||||
border: 1px solid var(--border-control);
|
|
||||||
background: var(--surface);
|
|
||||||
}
|
|
||||||
.channel-editor__attach svg { width: 22px; height: 22px; stroke-width: 1.9; }
|
|
||||||
|
|
||||||
.channel-editor__submit {
|
.channel-editor__submit {
|
||||||
color: var(--on-accent);
|
color: var(--on-accent);
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
@@ -204,7 +192,7 @@
|
|||||||
background: var(--surface-selected);
|
background: var(--surface-selected);
|
||||||
}
|
}
|
||||||
|
|
||||||
.channel-editor__footer.has-extra { grid-template-columns: auto auto minmax(0, 1fr) auto; }
|
.channel-editor__footer.has-extra { grid-template-columns: auto minmax(0, 1fr) auto; }
|
||||||
.channel-editor__type { display: block; min-width: 0; }
|
.channel-editor__type { display: block; min-width: 0; }
|
||||||
.channel-editor__type-select { min-height: 44px; width: auto; max-width: 9.5rem; padding-left: 12px; border-radius: 12px; font-size: .875rem; }
|
.channel-editor__type-select { min-height: 44px; width: auto; max-width: 9.5rem; padding-left: 12px; border-radius: 12px; font-size: .875rem; }
|
||||||
|
|
||||||
@@ -228,11 +216,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 400px) {
|
@media (max-width: 400px) {
|
||||||
.channel-editor__footer.has-extra { grid-template-columns: auto minmax(0, 1fr) auto; row-gap: 8px; }
|
.channel-editor__footer.has-extra .channel-editor__counter { display: none; }
|
||||||
.channel-editor__footer.has-extra .channel-editor__type { grid-row: 1; grid-column: 1 / 3; }
|
|
||||||
.channel-editor__footer.has-extra .channel-editor__counter { grid-row: 1; grid-column: 3; }
|
|
||||||
.channel-editor__footer.has-extra .channel-editor__attach { grid-row: 2; grid-column: 1; }
|
|
||||||
.channel-editor__footer.has-extra .channel-editor__submit { grid-row: 2; grid-column: 3; }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-reduced-motion: reduce) {
|
@media (prefers-reduced-motion: reduce) {
|
||||||
@@ -242,3 +226,13 @@
|
|||||||
.channel-editor__author-text small { color: var(--text-secondary); font-size: .75rem; }
|
.channel-editor__author-text small { color: var(--text-secondary); font-size: .75rem; }
|
||||||
.channel-editor__draft { justify-self: end; color: var(--text-secondary); font-size: .75rem; }
|
.channel-editor__draft { justify-self: end; color: var(--text-secondary); font-size: .75rem; }
|
||||||
.channel-editor__close svg { width: 24px; height: 24px; }
|
.channel-editor__close svg { width: 24px; height: 24px; }
|
||||||
|
|
||||||
|
/* Поле ввода как в Threads: без рамки, под именем автора, с отступом под аватар; вложения и «прикрепить» – ниже текста. */
|
||||||
|
.channel-editor__compose { display: grid; gap: 8px; margin: -8px 0 0 52px; }
|
||||||
|
.channel-editor__compose .channel-editor__input { min-height: 48px; padding: 0; border: 0; border-radius: 0; background: transparent; }
|
||||||
|
.channel-editor__compose .channel-editor__input:focus-visible { border: 0; }
|
||||||
|
.channel-editor__tools { display: flex; align-items: center; gap: 4px; margin-left: -10px; }
|
||||||
|
.channel-editor__tools .channel-editor__attach { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); }
|
||||||
|
.channel-editor__tools .channel-editor__attach:hover { color: var(--text-primary); }
|
||||||
|
.channel-editor__tools .channel-editor__clear { margin-left: auto; }
|
||||||
|
.channel-editor__tools .channel-editor__attach svg { width: 22px; height: 22px; }
|
||||||
|
|||||||
@@ -54,3 +54,13 @@ button.thread-quote:hover { background: var(--surface); }
|
|||||||
|
|
||||||
/* Отдельная публикация в обсуждении использует карточку и действия из ленты. */
|
/* Отдельная публикация в обсуждении использует карточку и действия из ленты. */
|
||||||
.thread-block--focus > .channel-message-card { margin-bottom: 8px; }
|
.thread-block--focus > .channel-message-card { margin-bottom: 8px; }
|
||||||
|
|
||||||
|
/* Строка ответа внизу обсуждения (как в Threads): аватар, поле-кнопка, «прикрепить», «развернуть». */
|
||||||
|
.thread-reply-bar { display: flex; align-items: center; gap: 4px; width: 100%; min-height: 48px; padding: 0 6px 0 8px; border: 1px solid var(--border-control); border-radius: 24px; background: var(--surface); }
|
||||||
|
.thread-reply-bar .avatar.thread-reply-bar__avatar { width: 30px; height: 30px; min-width: 30px; min-height: 30px; font-size: 12px; }
|
||||||
|
.thread-reply-bar__field { flex: 1; min-width: 0; min-height: 44px; padding: 0 6px; border: 0; background: transparent; color: var(--text-secondary); font: inherit; font-size: 1rem; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: text; }
|
||||||
|
.thread-reply-bar__icon { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-secondary); cursor: pointer; }
|
||||||
|
.thread-reply-bar__icon:hover { color: var(--text-primary); background: var(--surface-selected); }
|
||||||
|
.thread-reply-bar__icon svg { width: 22px; height: 22px; }
|
||||||
|
.thread-reply-bar__field:focus-visible, .thread-reply-bar__icon:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
|
||||||
|
.thread-reply-guest { width: 100%; display: grid; }
|
||||||
|
|||||||
Reference in New Issue
Block a user