fix: use inline styles for message backgrounds (Tailwind purge issue)

This commit is contained in:
Markov 2026-02-24 13:17:48 +01:00
parent 2210b6ae9f
commit b95fb074b1

View File

@ -203,14 +203,14 @@ export default function ChatPanel({ chatId, fullscreen = false }: Props) {
<div className="text-center text-xs text-[var(--muted)] py-1">Загрузка...</div> <div className="text-center text-xs text-[var(--muted)] py-1">Загрузка...</div>
)} )}
{messages.map((msg) => { {messages.map((msg) => {
const bgClass = const bgStyle =
msg.author_type === "system" msg.author_type === "system"
? "bg-yellow-900/30 rounded px-2 py-1" ? { backgroundColor: "rgba(161, 120, 0, 0.2)", borderRadius: 6, padding: "4px 8px" }
: msg.author_type === "agent" : msg.author_type === "agent"
? "bg-green-900/30 rounded px-2 py-1" ? { backgroundColor: "rgba(0, 120, 60, 0.2)", borderRadius: 6, padding: "4px 8px" }
: ""; : undefined;
return ( return (
<div key={msg.id} className={`text-sm ${bgClass}`}> <div key={msg.id} className="text-sm" style={bgStyle}>
<span className="text-xs text-[var(--muted)]"> <span className="text-xs text-[var(--muted)]">
{AUTHOR_ICON[msg.author_type] || "👤"} {msg.author_slug} {AUTHOR_ICON[msg.author_type] || "👤"} {msg.author_slug}
</span> </span>