From 153e68e0552ce5f612c1e7068133e65cf2baa2f7 Mon Sep 17 00:00:00 2001 From: zhaoying Date: Sat, 7 Mar 2026 15:09:22 +0800 Subject: [PATCH] feat(web): ui upgrade --- .../components/VariableList/VariableList.tsx | 29 +++++++++++++------ .../Conversation/components/FileUpload.tsx | 12 ++++---- 2 files changed, 26 insertions(+), 15 deletions(-) diff --git a/web/src/views/ApplicationConfig/components/VariableList/VariableList.tsx b/web/src/views/ApplicationConfig/components/VariableList/VariableList.tsx index 8e9d2452..6f72c0da 100644 --- a/web/src/views/ApplicationConfig/components/VariableList/VariableList.tsx +++ b/web/src/views/ApplicationConfig/components/VariableList/VariableList.tsx @@ -1,8 +1,8 @@ /* * @Author: ZhaoYing * @Date: 2026-02-03 16:26:32 - * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-02-03 16:26:32 + * @Last Modified by: ZhaoYing + * @Last Modified time: 2026-02-25 15:09:09 */ /** * Variable List Component @@ -56,12 +56,22 @@ interface VariableListProps { } return ( - {t('application.variableConfiguration')} - ({t('application.VariableManagementDesc')}) - } - extra={} + title={t('application.variableConfiguration')} + extra={ + + } > +
+ {t('application.variableManagement')} + ({t('application.variableManagementDesc')}) +
+ {(fields, { remove }) => { return ( @@ -69,6 +79,7 @@ interface VariableListProps { {fields.length > 0 ? (
+ render: (required) => }, { title: t('common.operation'), @@ -117,7 +128,7 @@ interface VariableListProps { /> ) : ( - +
)} ) diff --git a/web/src/views/Conversation/components/FileUpload.tsx b/web/src/views/Conversation/components/FileUpload.tsx index b4f11b1b..256f2d42 100644 --- a/web/src/views/Conversation/components/FileUpload.tsx +++ b/web/src/views/Conversation/components/FileUpload.tsx @@ -2,7 +2,7 @@ * @Author: ZhaoYing * @Date: 2026-02-06 21:09:42 * @Last Modified by: ZhaoYing - * @Last Modified time: 2026-03-06 12:20:43 + * @Last Modified time: 2026-03-07 15:03:31 */ /** * File Upload Component @@ -21,7 +21,7 @@ * @component */ import { useState, useEffect, forwardRef, useImperativeHandle } from 'react'; -import { Upload, Progress, App } from 'antd'; +import { Upload, Progress, App, Flex } from 'antd'; import type { UploadProps, UploadFile } from 'antd'; import type { UploadProps as RcUploadProps } from 'antd/es/upload/interface'; import { useTranslation } from 'react-i18next'; @@ -194,7 +194,7 @@ const UploadFiles = forwardRef(({ formData.append('file', file); const response = await request.uploadFile(action, formData, requestConfig); - + onSuccess?.({data: response}); } catch (error) { onError?.(error as Error); @@ -260,10 +260,10 @@ const UploadFiles = forwardRef(({ itemRender: (_, file, __, actions) => { return (
-
+ {file.name} - actions?.remove()}>Cancel -
+ actions?.remove()}>{t('common.cancel')} +
);