From 8a2aebf845469932a1f677b6410e30d2ba96229c Mon Sep 17 00:00:00 2001 From: t0ng7u Date: Sun, 3 Aug 2025 19:45:58 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(edit-vendor-modal):=20add=20ic?= =?UTF-8?q?on-library=20reference=20link=20&=20tidy=20status=20switch?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Highlights • Introduced `Typography.Text` link with `IconLink` in `extraText` for the **icon** field, pointing to LobeHub’s full icon catalogue; only “请点击我” is clickable for clarity. • Added required imports for `Typography` and `IconLink`. • Removed unnecessary `size="large"` prop from the status `Form.Switch` to align with default form styling. These tweaks improve user guidance when selecting vendor icons and refine the modal’s visual consistency. --- .../components/table/models/ModelsColumnDefs.js | 4 ++-- .../table/models/modals/EditVendorModal.jsx | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/web/src/components/table/models/ModelsColumnDefs.js b/web/src/components/table/models/ModelsColumnDefs.js index db4dae88..d2da5b0a 100644 --- a/web/src/components/table/models/ModelsColumnDefs.js +++ b/web/src/components/table/models/ModelsColumnDefs.js @@ -115,7 +115,7 @@ const renderEndpoints = (text) => { return renderLimitedItems({ items: arr, renderItem: (ep, idx) => ( - + {ep} ), @@ -128,7 +128,7 @@ const renderBoundChannels = (channels) => { return renderLimitedItems({ items: channels, renderItem: (c, idx) => ( - + {c.name}({c.type}) ), diff --git a/web/src/components/table/models/modals/EditVendorModal.jsx b/web/src/components/table/models/modals/EditVendorModal.jsx index 9ddf5cb4..f0e00387 100644 --- a/web/src/components/table/models/modals/EditVendorModal.jsx +++ b/web/src/components/table/models/modals/EditVendorModal.jsx @@ -25,6 +25,8 @@ import { Row, } from '@douyinfe/semi-ui'; import { API, showError, showSuccess } from '../../../../helpers'; +import { Typography } from '@douyinfe/semi-ui'; +import { IconLink } from '@douyinfe/semi-icons'; import { useTranslation } from 'react-i18next'; import { useIsMobile } from '../../../../hooks/common/useIsMobile'; @@ -157,6 +159,18 @@ const EditVendorModal = ({ visible, handleClose, refresh, editingVendor }) => { field="icon" label={t('供应商图标')} placeholder={t('请输入图标名称,如:OpenAI、Claude.Color')} + extraText={ + + {t('图标使用@lobehub/icons库,查询所有可用图标 ')} + } + underline + > + {t('请点击我')} + + + } showClear /> @@ -164,7 +178,6 @@ const EditVendorModal = ({ visible, handleClose, refresh, editingVendor }) => {