From a3169648f328c56958c6d65e9fd431af0a45040e Mon Sep 17 00:00:00 2001 From: dev Date: Tue, 6 Oct 2026 00:35:25 +0300 Subject: [PATCH] =?UTF-8?q?style(chat):=20=D1=86=D0=B8=D1=82=D0=B0=D1=82?= =?UTF-8?q?=D0=B0=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82=D0=B0=20=D0=BA=D0=B0?= =?UTF-8?q?=D0=BA=20=D0=B2=20=D1=82=D0=B5=D0=BB=D0=B5=D0=B3=D1=80=D0=B0?= =?UTF-8?q?=D0=BC=D0=B5=20=E2=80=94=20=D0=BA=D0=B2=D0=B0=D0=B4=D1=80=D0=B0?= =?UTF-8?q?=D1=82=20=D1=81=D0=BB=D0=B5=D0=B2=D0=B0,=20=D1=82=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D1=82=20=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Миниатюра вложения в цитате больше не растягивается на всю ширину: фиксированный квадрат 44x44 слева, автор и текст в колонке справа. Обёртка .msg-reply-body даёт им flex:1, поэтому длинный текст обрезается многоточием по месту, а не растягивает цитату. --- public/admin.css | 11 ++++++----- public/js/chat.js | 5 +++-- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/public/admin.css b/public/admin.css index 6c04ce3..43afc5c 100644 --- a/public/admin.css +++ b/public/admin.css @@ -982,13 +982,14 @@ body.report-card-open .report-fields{display:flex} .msg-act:hover{color:var(--accent);background:var(--bg)} .msg-act-del:hover{color:#ef4444} .msg-act svg{width:13px;height:13px} -.msg-reply{display:flex;flex-direction:column;gap:1px;border-left:2px solid var(--accent);background:var(--bg);border-radius:0 7px 7px 0;padding:4px 8px;margin-bottom:2px;min-width:0;text-align:left;font:inherit;cursor:pointer;position:relative} +.msg-reply{display:flex;align-items:center;gap:8px;border-left:2px solid var(--accent);background:var(--bg);border-radius:0 7px 7px 0;padding:4px 8px;margin-bottom:2px;min-width:0;text-align:left;font:inherit;cursor:pointer} .msg-reply:hover{background:var(--card);border-left-color:var(--accent)} -.msg-reply-img{display:block;width:100%;max-width:280px;max-height:150px;object-fit:cover;border-radius:6px;background:var(--card);margin-bottom:4px} -.msg-reply-who{font-size:.68rem;color:var(--accent);font-weight:600} -.msg-reply-text{font-size:.75rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:280px} +.msg-reply-body{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1} +.msg-reply-img{display:block;width:44px;height:44px;flex-shrink:0;object-fit:cover;border-radius:6px;background:var(--card)} +.msg-reply-who{font-size:.68rem;color:var(--accent);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} +.msg-reply-text{font-size:.75rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap} .msg-reply-text[hidden]{display:none} -.msg-reply-file{display:inline-flex;align-items:center;gap:5px;font-size:.75rem;color:var(--muted);max-width:280px;min-width:0} +.msg-reply-file{display:inline-flex;align-items:center;gap:5px;font-size:.75rem;color:var(--muted);min-width:0} .msg-reply-file[hidden]{display:none} .msg-reply-file svg{width:13px;height:13px;flex-shrink:0} .msg-reply-file span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap} diff --git a/public/js/chat.js b/public/js/chat.js index a859fa8..51f6b49 100644 --- a/public/js/chat.js +++ b/public/js/chat.js @@ -163,8 +163,9 @@ function chatReplyHtml(m) { const inner = gone ? `${head}Сообщение удалено` : `${head}${body ? `${esc(body)}` : ''}${fileLine}`; - if (gone) return `
${inner}
`; - return ``; + const body2 = `${inner}`; + if (gone) return `
${body2}
`; + return ``; } function addChatMessage(m) {