diff --git a/docs/content.en/docs/release-notes/_index.md b/docs/content.en/docs/release-notes/_index.md index b28c1aba..c6886059 100644 --- a/docs/content.en/docs/release-notes/_index.md +++ b/docs/content.en/docs/release-notes/_index.md @@ -53,6 +53,7 @@ Information about release notes of Coco Server is provided here. - feat: add a component for text reading aloud #522 - style: history component styles #528 - fix: app icon & category icon #529 +- style: search error styles #533 ## 0.4.0 (2025-04-27) diff --git a/src/components/Common/ErrorNotification/ErrorSearch.tsx b/src/components/Common/ErrorNotification/ErrorSearch.tsx index 546abf9d..07dbb312 100644 --- a/src/components/Common/ErrorNotification/ErrorSearch.tsx +++ b/src/components/Common/ErrorNotification/ErrorSearch.tsx @@ -3,38 +3,48 @@ import { CircleAlert, Bolt, X, Ellipsis } from "lucide-react"; import { useTranslation } from "react-i18next"; import platformAdapter from "@/utils/platformAdapter"; -import Tooltip from "@/components/Common/Tooltip"; interface ErrorSearchProps { isError: any[]; } -const ErrorSearch = ({ - isError, -}: ErrorSearchProps) => { +const ErrorSearch = ({ isError }: ErrorSearchProps) => { const { t } = useTranslation(); const [showError, setShowError] = useState(isError?.length > 0); + const [showContent, setShowContent] = useState(false); if (!showError) return null; return ( -
- +
+ + {t("search.list.failures")} - + {showContent && ( + + {isError?.map((item) => item.error).join(", ")} + + )} + +
{ + setShowContent(!showContent); + }} + className="inline-flex items-center" + > - +
{ platformAdapter.emitEvent("open_settings", "connect"); }} /> setShowError(false)} />