diff --git a/web/app/(commonLayout)/apps/check-legacy/components/list.tsx b/web/app/(commonLayout)/apps/check-legacy/components/list.tsx index d464c4e76f..511098af63 100644 --- a/web/app/(commonLayout)/apps/check-legacy/components/list.tsx +++ b/web/app/(commonLayout)/apps/check-legacy/components/list.tsx @@ -3,43 +3,51 @@ import type { FC } from 'react' import React from 'react' import { useTranslation } from 'react-i18next' import cn from '@/utils/classnames' +import AppIcon from '@/app/components/base/app-icon' +const i18nPrefix = 'app.checkLegacy.list' type Props = { + className?: string list: any[] } const List: FC = ({ + className, list, }) => { const { t } = useTranslation() return ( -
+
{list.length > 0 ? ( - - - - - + + + + + - + {list.map((item, index) => ( - - + - + ))} +
xxx{t('appLog.table.header.endUser')}{t('appLog.table.header.userRate')}{t('appLog.table.header.time')}{t('appLog.table.header.time')}{t(`${i18nPrefix}.appName`)}{t(`${i18nPrefix}.published`)}{t(`${i18nPrefix}.createBy`)}{t(`${i18nPrefix}.lastRequest`)}{t(`${i18nPrefix}.createAt`)}
- Python bug fixer +
+
+ +
Python bug fixer
+
Yes{t('app.checkLegacy.yes')} Evan · evan@dify.ai 2023-03-21 10:25 2023-03-21 10:25
) : ( -
No items found
+
{t(`${i18nPrefix}.noData`)}
)}
) diff --git a/web/app/(commonLayout)/apps/check-legacy/page.tsx b/web/app/(commonLayout)/apps/check-legacy/page.tsx index 73f23084ec..6d9fefc0d9 100644 --- a/web/app/(commonLayout)/apps/check-legacy/page.tsx +++ b/web/app/(commonLayout)/apps/check-legacy/page.tsx @@ -8,12 +8,16 @@ import { RiFilter3Line, RiLoopLeftLine } from '@remixicon/react' import { useCallback } from 'react' import { useTranslation } from 'react-i18next' import Button from '@/app/components/base/button' +import Pagination from '@/app/components/base/pagination' +import { APP_PAGE_LIMIT } from '@/config' +import { noop } from 'lodash' const i18nPrefix = 'app.checkLegacy' const Page = () => { const { t } = useTranslation() const { list, + total, sort_by, setOrderBy, published, @@ -37,43 +41,55 @@ const Page = () => { }, [published, t]) return ( -
+
- {/* Filter */} -
-
- } - value={published} - renderTriggerContent={renderTriggerContent} - onSelect={handleSelectPublished} - onClear={clearPublished} - items={[ - { value: 1, name: t(`${i18nPrefix}.yes`) }, - { value: 0, name: t(`${i18nPrefix}.no`) }, - ]} - /> -
- +
+
+ {/* Filter */} +
+
+ } + value={published} + renderTriggerContent={renderTriggerContent} + onSelect={handleSelectPublished} + onClear={clearPublished} + items={[ + { value: 1, name: t(`${i18nPrefix}.yes`) }, + { value: 0, name: t(`${i18nPrefix}.no`) }, + ]} + /> +
+ +
+ +
+ + {(total && total > APP_PAGE_LIMIT) + ? + : null}
- -
-
-
) diff --git a/web/app/(commonLayout)/apps/check-legacy/use-legacy-list.ts b/web/app/(commonLayout)/apps/check-legacy/use-legacy-list.ts index 3bd50d2166..502d3fa69f 100644 --- a/web/app/(commonLayout)/apps/check-legacy/use-legacy-list.ts +++ b/web/app/(commonLayout)/apps/check-legacy/use-legacy-list.ts @@ -30,6 +30,7 @@ const useLegacyList = () => { }, [queryParams]) return { + total: 100, list, sort_by, setOrderBy, diff --git a/web/i18n/en-US/app.ts b/web/i18n/en-US/app.ts index 2321c64e55..93442fccf9 100644 --- a/web/i18n/en-US/app.ts +++ b/web/i18n/en-US/app.ts @@ -241,6 +241,14 @@ const translation = { no: 'No', createAt: 'Created At', lastRequest: 'Last Request', + list: { + appName: 'App Name', + published: 'Published', + createBy: 'Created By', + lastRequest: 'Last Request', + createAt: 'Created At', + noData: 'No items found', + }, }, } diff --git a/web/i18n/zh-Hans/app.ts b/web/i18n/zh-Hans/app.ts index 8122f2d33d..158d063b27 100644 --- a/web/i18n/zh-Hans/app.ts +++ b/web/i18n/zh-Hans/app.ts @@ -242,6 +242,14 @@ const translation = { no: '否', createAt: '创建时间', lastRequest: '最后请求', + list: { + appName: '应用名称', + published: '已发布', + createBy: '创建者', + lastRequest: '最后请求时间', + createAt: '创建时间', + noData: '暂无数据', + }, }, }