Cleaner approved/rejected UI

This commit is contained in:
Will Chen
2025-04-18 14:09:55 -07:00
parent e3568f9a97
commit e5ff755c19

View File

@@ -3,6 +3,7 @@ import type { Message } from "@/ipc/ipc_types";
import { DyadMarkdownParser } from "./DyadMarkdownParser"; import { DyadMarkdownParser } from "./DyadMarkdownParser";
import { motion } from "framer-motion"; import { motion } from "framer-motion";
import { useStreamChat } from "@/hooks/useStreamChat"; import { useStreamChat } from "@/hooks/useStreamChat";
import { CheckCircle, XCircle } from "lucide-react";
interface ChatMessageProps { interface ChatMessageProps {
message: Message; message: Message;
@@ -67,15 +68,17 @@ const ChatMessage = ({ message }: ChatMessageProps) => {
</div> </div>
)} )}
{message.approvalState && ( {message.approvalState && (
<div className="mt-2 text-xs"> <div className="mt-2 flex items-center justify-end space-x-1 text-xs">
{message.approvalState === "approved" ? ( {message.approvalState === "approved" ? (
<div className="bg-green-100 text-green-800 dark:bg-green-900 dark:text-green-200 p-1 rounded"> <>
Approved <CheckCircle className="h-4 w-4 text-green-500" />
</div> <span>Approved</span>
</>
) : message.approvalState === "rejected" ? ( ) : message.approvalState === "rejected" ? (
<div className="bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-200 p-1 rounded"> <>
Rejected <XCircle className="h-4 w-4 text-red-500" />
</div> <span>Rejected</span>
</>
) : null} ) : null}
</div> </div>
)} )}