fix(web): match thread notification icons to sidebar status (#12806)
This commit is contained in:
1 parent
790be6d755
commit
30e3649c32
1 file changed
+28
-1
@@ -2,6 +2,12 @@ import { useAtomValue } from "@effect/atom-react";
|
||||
import { useNavigate, useParams } from "@tanstack/react-router";
|
||||
import type { EnvironmentId, ThreadId } from "@t3tools/contracts";
|
||||
import * as Option from "effect/Option";
|
||||
import {
|
||||
CircleAlertIcon,
|
||||
CircleCheckIcon,
|
||||
MessageCircleQuestionIcon,
|
||||
ShieldQuestionIcon,
|
||||
} from "lucide-react";
|
||||
import { useCallback, useEffect, useRef } from "react";
|
||||
|
||||
import { getClientSettings, useClientSettings } from "../hooks/useSettings";
|
||||
@@ -154,7 +160,28 @@ function EnvironmentNotifications({
|
||||
type: kind === "completion" ? "success" : status === "failed" ? "error" : "warning",
|
||||
title,
|
||||
description: thread.title,
|
||||
data: { hideCopyButton: true },
|
||||
data: {
|
||||
hideCopyButton: true,
|
||||
leadingIcon:
|
||||
kind === "completion" ? (
|
||||
<CircleCheckIcon
|
||||
aria-hidden
|
||||
className="size-4 text-emerald-700 dark:text-emerald-300"
|
||||
/>
|
||||
) : status === "approval" ? (
|
||||
<ShieldQuestionIcon
|
||||
aria-hidden
|
||||
className="size-4 text-amber-700 dark:text-amber-300"
|
||||
/>
|
||||
) : status === "failed" ? (
|
||||
<CircleAlertIcon aria-hidden className="size-4 text-red-700 dark:text-red-300" />
|
||||
) : (
|
||||
<MessageCircleQuestionIcon
|
||||
aria-hidden
|
||||
className="size-4 text-indigo-600 dark:text-indigo-300"
|
||||
/>
|
||||
),
|
||||
},
|
||||
actionProps: {
|
||||
children: "Open thread",
|
||||
onClick: () => {
|
||||
|
||||
Reference in new issue
Block a user