From 73e52fe3341713a47bcee7f609d774ec1aa5e1f6 Mon Sep 17 00:00:00 2001 From: jialin Date: Mon, 9 Mar 2026 15:46:21 +0800 Subject: [PATCH] chore: add hint for creating backend --- src/locales/en-US/backends.ts | 4 +++- src/locales/ja-JP/backends.ts | 4 +++- src/locales/ru-RU/backends.ts | 5 ++++- src/locales/zh-CN/backends.ts | 4 +++- src/pages/backends/components/add-modal.tsx | 24 ++++++++++++++++----- 5 files changed, 32 insertions(+), 9 deletions(-) diff --git a/src/locales/en-US/backends.ts b/src/locales/en-US/backends.ts index dad1fec5..902ee9af 100644 --- a/src/locales/en-US/backends.ts +++ b/src/locales/en-US/backends.ts @@ -44,5 +44,7 @@ export default { 'backend.filter.source': 'Filter by source', 'backend.add.custom': 'Custom', 'backend.add.community': 'Community', - 'backend.community.title': 'Community Backend Marketplace' + 'backend.community.title': 'Community Backend Marketplace', + 'backend.form.add.hint': + 'To use a different version of a built-in backend (e.g., vLLM, SGLang, MindIE), please add a new version to the existing backend instead of adding a custom backend.' }; diff --git a/src/locales/ja-JP/backends.ts b/src/locales/ja-JP/backends.ts index dad1fec5..902ee9af 100644 --- a/src/locales/ja-JP/backends.ts +++ b/src/locales/ja-JP/backends.ts @@ -44,5 +44,7 @@ export default { 'backend.filter.source': 'Filter by source', 'backend.add.custom': 'Custom', 'backend.add.community': 'Community', - 'backend.community.title': 'Community Backend Marketplace' + 'backend.community.title': 'Community Backend Marketplace', + 'backend.form.add.hint': + 'To use a different version of a built-in backend (e.g., vLLM, SGLang, MindIE), please add a new version to the existing backend instead of adding a custom backend.' }; diff --git a/src/locales/ru-RU/backends.ts b/src/locales/ru-RU/backends.ts index cf13dcfa..cb6b8f77 100644 --- a/src/locales/ru-RU/backends.ts +++ b/src/locales/ru-RU/backends.ts @@ -44,7 +44,9 @@ export default { 'backend.filter.source': 'Filter by source', 'backend.add.custom': 'Custom', 'backend.add.community': 'Community', - 'backend.community.title': 'Community Backend Marketplace' + 'backend.community.title': 'Community Backend Marketplace', + 'backend.form.add.hint': + 'To use a different version of a built-in backend (e.g., vLLM, SGLang, MindIE), please add a new version to the existing backend instead of adding a custom backend.' }; // ========== To-Do: Translate Keys (Remove After Translation) ========== @@ -54,4 +56,5 @@ export default { // 4. 'backend.add.custom': 'Custom', // 5. 'backend.add.community': 'Community', // 6. 'backend.community.title': 'Community Backend Marketplace' +// 7. 'backend.form.add.hint': 'To use a different version of a built-in backend (e.g., vLLM, SGLang, MindIE), please add a new version to the existing backend instead of adding a custom backend.' // ========== End of To-Do List ========== diff --git a/src/locales/zh-CN/backends.ts b/src/locales/zh-CN/backends.ts index 81d47108..16f7d29c 100644 --- a/src/locales/zh-CN/backends.ts +++ b/src/locales/zh-CN/backends.ts @@ -41,5 +41,7 @@ export default { 'backend.filter.source': '按来源过滤', 'backend.add.custom': '自定义', 'backend.add.community': '社区', - 'backend.community.title': '社区后端市场' + 'backend.community.title': '社区后端市场', + 'backend.form.add.hint': + '如果需要使用内置后端(如 vLLM、SGLang、MindIE)的其他版本,请在对应后端中添加新版本,而不是添加自定义后端。' }; diff --git a/src/pages/backends/components/add-modal.tsx b/src/pages/backends/components/add-modal.tsx index 4a1bbe52..cb411dae 100644 --- a/src/pages/backends/components/add-modal.tsx +++ b/src/pages/backends/components/add-modal.tsx @@ -1,3 +1,4 @@ +import AlertBlockInfo from '@/components/alert-info/block'; import IconFont from '@/components/icon-font'; import ModalFooter from '@/components/modal-footer'; import GSDrawer from '@/components/scroller-modal/gs-drawer'; @@ -244,11 +245,24 @@ const AddModal: React.FC = (props) => { } }} footer={ - + <> + {action === PageAction.CREATE && ( +
+ +
+ )} + + } >