fix: use inline styles for message backgrounds (Tailwind purge issue)
This commit is contained in:
parent
2210b6ae9f
commit
b95fb074b1
@ -203,14 +203,14 @@ export default function ChatPanel({ chatId, fullscreen = false }: Props) {
|
||||
<div className="text-center text-xs text-[var(--muted)] py-1">Загрузка...</div>
|
||||
)}
|
||||
{messages.map((msg) => {
|
||||
const bgClass =
|
||||
const bgStyle =
|
||||
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"
|
||||
? "bg-green-900/30 rounded px-2 py-1"
|
||||
: "";
|
||||
? { backgroundColor: "rgba(0, 120, 60, 0.2)", borderRadius: 6, padding: "4px 8px" }
|
||||
: undefined;
|
||||
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)]">
|
||||
{AUTHOR_ICON[msg.author_type] || "👤"} {msg.author_slug}
|
||||
</span>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user