From 964ce48cbc366dfc9e007daf9b693991685be20a Mon Sep 17 00:00:00 2001 From: Joel Date: Thu, 3 Jul 2025 10:56:54 +0800 Subject: [PATCH] chore: tip --- .../apps/check-legacy/components/list.tsx | 4 +--- .../apps/check-legacy/components/tip.tsx | 10 +++++++++- .../apps/check-legacy/use-legacy-list.ts | 2 +- web/i18n/en-US/app.ts | 5 +++++ web/i18n/zh-Hans/app.ts | 5 +++++ 5 files changed, 21 insertions(+), 5 deletions(-) diff --git a/web/app/(commonLayout)/apps/check-legacy/components/list.tsx b/web/app/(commonLayout)/apps/check-legacy/components/list.tsx index 511098af63..864c953000 100644 --- a/web/app/(commonLayout)/apps/check-legacy/components/list.tsx +++ b/web/app/(commonLayout)/apps/check-legacy/components/list.tsx @@ -7,17 +7,15 @@ 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 ? ( diff --git a/web/app/(commonLayout)/apps/check-legacy/components/tip.tsx b/web/app/(commonLayout)/apps/check-legacy/components/tip.tsx index ba71d93c19..dae25804a5 100644 --- a/web/app/(commonLayout)/apps/check-legacy/components/tip.tsx +++ b/web/app/(commonLayout)/apps/check-legacy/components/tip.tsx @@ -2,14 +2,22 @@ import { RiBookOpenLine } from '@remixicon/react' import type { FC } from 'react' import React from 'react' +import { useTranslation } from 'react-i18next' + +const i18nPrefix = 'app.checkLegacy.tip' const Tip: FC = () => { + const { t } = useTranslation() return (
-
+
+
{t(`${i18nPrefix}.title`)}
+
{t(`${i18nPrefix}.description`)}
+ {t(`${i18nPrefix}.learnMore`)}
) } + export default React.memo(Tip) 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 502d3fa69f..59cf24999b 100644 --- a/web/app/(commonLayout)/apps/check-legacy/use-legacy-list.ts +++ b/web/app/(commonLayout)/apps/check-legacy/use-legacy-list.ts @@ -2,7 +2,7 @@ import produce from 'immer' import { useCallback, useState } from 'react' const useLegacyList = () => { - const list: any[] = [{}, {}, {}] // Placeholder for the list, replace with actual data fetching logic + const list: any[] = [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}] // Placeholder for the list, replace with actual data fetching logic const [queryParams, setQueryParams] = useState>({}) const { sort_by, diff --git a/web/i18n/en-US/app.ts b/web/i18n/en-US/app.ts index 93442fccf9..0bf3a682ef 100644 --- a/web/i18n/en-US/app.ts +++ b/web/i18n/en-US/app.ts @@ -249,6 +249,11 @@ const translation = { createAt: 'Created At', noData: 'No items found', }, + tip: { + title: 'How to solve it?', + description: 'You can now create file type variables in the start form. We will no longer support the image upload feature in the future.', + learnMore: 'Learn more', + }, }, } diff --git a/web/i18n/zh-Hans/app.ts b/web/i18n/zh-Hans/app.ts index 158d063b27..4a079d2283 100644 --- a/web/i18n/zh-Hans/app.ts +++ b/web/i18n/zh-Hans/app.ts @@ -250,6 +250,11 @@ const translation = { createAt: '创建时间', noData: '暂无数据', }, + tip: { + title: '如何解决?', + description: '您现在可以在开始表单中创建文件类型变量。未来我们将不再支持图片上传功能。', + learnMore: '了解更多', + }, }, }