From a01bfbfc40254910174b4f70227dd6ea36a705c0 Mon Sep 17 00:00:00 2001 From: Markov Date: Tue, 24 Feb 2026 13:21:19 +0100 Subject: [PATCH] fix: apply message background colors in fullscreen chat too --- src/components/ChatPanel.tsx | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/components/ChatPanel.tsx b/src/components/ChatPanel.tsx index 6cf7449..ae7a6ae 100644 --- a/src/components/ChatPanel.tsx +++ b/src/components/ChatPanel.tsx @@ -130,17 +130,25 @@ export default function ChatPanel({ chatId, fullscreen = false }: Props) { } }; - const renderMessage = (msg: Message) => ( -
-
- {AUTHOR_ICON[msg.author_type] || "👤"} - {msg.author_slug} - · - {new Date(msg.created_at).toLocaleString("ru-RU", { hour: "2-digit", minute: "2-digit" })} + const renderMessage = (msg: Message) => { + const bgStyle = + msg.author_type === "system" + ? { backgroundColor: "rgba(161, 120, 0, 0.2)", borderRadius: 6, padding: "4px 8px" } + : msg.author_type === "agent" + ? { backgroundColor: "rgba(0, 120, 60, 0.2)", borderRadius: 6, padding: "4px 8px" } + : undefined; + return ( +
+
+ {AUTHOR_ICON[msg.author_type] || "👤"} + {msg.author_slug} + · + {new Date(msg.created_at).toLocaleString("ru-RU", { hour: "2-digit", minute: "2-digit" })} +
+
{msg.content}
-
{msg.content}
-
- ); + ); + }; if (fullscreen) { return (