mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-23 06:46:40 +08:00
### 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:
@ -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>
|
||||
|
||||
Reference in New Issue
Block a user