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)
This commit is contained in:
chanx
2025-09-08 12:49:12 +08:00
committed by GitHub
parent f48aed6d4a
commit cf18231713
10 changed files with 149 additions and 20 deletions

View File

@ -9,6 +9,7 @@ import {
} from '@/components/ui/pagination';
import { RAGFlowSelect, RAGFlowSelectOptionType } from '@/components/ui/select';
import { cn } from '@/lib/utils';
import { t } from 'i18next';
import { useCallback, useEffect, useMemo, useState } from 'react';
export type RAGFlowPaginationType = {
@ -32,7 +33,11 @@ export function RAGFlowPagination({
const sizeChangerOptions: RAGFlowSelectOptionType[] = useMemo(() => {
return [10, 20, 50, 100].map((x) => ({
label: <span>{x} / page</span>,
label: (
<span>
{x} / {t('pagination.page')}
</span>
),
value: x.toString(),
}));
}, []);
@ -134,7 +139,7 @@ export function RAGFlowPagination({
return (
<section className="flex items-center justify-end text-text-sub-title-invert">
<span className="mr-4">Total {total}</span>
<span className="mr-4">{t('pagination.total', { total: total })}</span>
<Pagination className="w-auto mx-0 mr-4">
<PaginationContent>
<PaginationItem>