From cf182317130438109e84004a7dd62fbd8bff5189 Mon Sep 17 00:00:00 2001 From: chanx <1243304602@qq.com> Date: Mon, 8 Sep 2025 12:49:12 +0800 Subject: [PATCH] Fix: Optimized the test results page layout and internationalization #3221 (#9974) ### What problem does this PR solve? Fix: Optimized the test results page layout and internationalization - Added an empty data component for when test results are empty - Optimized internationalization support for the paging component - Updated the layout and style of the test results page - Added a tooltip for when test results are empty ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) --- web/src/components/empty/empty.tsx | 77 +++++++++++++++++++ web/src/components/ui/ragflow-pagination.tsx | 9 ++- web/src/hooks/use-knowledge-request.ts | 4 +- web/src/interfaces/database/knowledge.ts | 1 + web/src/locales/en.ts | 9 +++ web/src/locales/zh.ts | 7 ++ .../dataset/dataset/parsing-status-cell.tsx | 2 +- web/src/pages/dataset/testing/index.tsx | 5 +- .../pages/dataset/testing/testing-result.tsx | 53 +++++++++---- web/src/pages/next-search/search-view.tsx | 2 +- 10 files changed, 149 insertions(+), 20 deletions(-) create mode 100644 web/src/components/empty/empty.tsx diff --git a/web/src/components/empty/empty.tsx b/web/src/components/empty/empty.tsx new file mode 100644 index 000000000..b32d25c5c --- /dev/null +++ b/web/src/components/empty/empty.tsx @@ -0,0 +1,77 @@ +import { cn } from '@/lib/utils'; +import { t } from 'i18next'; + +type EmptyProps = { + className?: string; + children?: React.ReactNode; +}; + +const EmptyIcon = () => ( + +); + +const Empty = (props: EmptyProps) => { + const { className, children } = props; + return ( +
{x.content_with_weight}
-{x.content_with_weight}
+