mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-13 07:40:56 +00:00
♻️ refactor(channels): rebuild channel editor UX with modular sections and Base UI multi-select
Restructure the default-theme channel create/edit experience to match classic frontend behavior, improve form UX, and align with the project's Base UI design system. Channel editor architecture: - Split the monolithic channel mutate drawer into focused section components (basic, API access, auth, models, advanced) with shared drawer layout primitives - Extract submission, toast handling, and react-query cache invalidation into `useChannelMutateForm` - Add a dedicated loading skeleton for channel detail fetch during edit mode - Remove the top-level configuration summary block Form validation and data handling: - Strengthen `channel-form` Zod schema with JSON, model mapping, status code mapping, Codex credential, and Vertex AI key refinements - Move type-specific conditional validation into `superRefine` - Normalize base URL formatting and tighten model mapping value validation Model mapping editor: - Add Visual/JSON tabbed editing with inline JSON and duplicate-key feedback - Improve accessibility for icon-only actions and add model suggestion datalists MultiSelect component: - Replace the custom cmdk-based implementation with Base UI Combobox chips - Align focus, border, ring, disabled, and invalid states with standard Input styling via `ComboboxChips` - Preserve existing API for all current callers (`options`, `selected`, `onChange`, `allowCreate`, `createLabel`) - Support inline custom value creation and comma/newline batch input - Limit visible chips with a compact "+N more" overflow summary via `maxVisibleChips` (8 in the channel editor) - Anchor the dropdown to the full chips container via `useComboboxAnchor` so the popup matches input width and long model names are no longer truncated Models & groups UX: - Integrate manual custom model entry directly into the model MultiSelect - Remove the separate manual model input/button block - Keep selected-model count badge and existing model-mapping guardrail behavior i18n: - Add and sync translation keys for section descriptions, validation messages, model mapping UI, and MultiSelect labels across en, zh, fr, ja, ru, and vi - Fix missing translations for "Name, provider type, and availability.", "Endpoint, provider-specific settings, and credentials.", and "Published models, groups, and model remapping rules." - Remove obsolete keys tied to the deprecated summary and manual model entry UI
This commit is contained in:
Vendored
+6
-3
@@ -1413,6 +1413,7 @@
|
||||
"Endpoint config": "Конфигурация конечной точки",
|
||||
"Endpoint Configuration": "Конфигурация конечной точки",
|
||||
"Endpoint Type": "Тип конечной точки",
|
||||
"Endpoint, provider-specific settings, and credentials.": "Эндпоинт, настройки провайдера и учетные данные.",
|
||||
"Endpoint:": "Конечная точка:",
|
||||
"Endpoints": "Конечные точки",
|
||||
"English": "Английский",
|
||||
@@ -1716,15 +1717,15 @@
|
||||
"Filled {{count}} model(s)": "Заполнено {{count}} моделей",
|
||||
"Filled {{count}} related model(s)": "Заполнено {{count}} связанных моделей",
|
||||
"Filter": "Фильтр",
|
||||
"Filter by API key...": "Фильтр по API-ключу...",
|
||||
"Filter by channel ID": "Фильтр по ID канала",
|
||||
"Filter by group": "Фильтр по группе",
|
||||
"Filter by Midjourney task ID": "Фильтр по ID задачи Midjourney",
|
||||
"Filter by model name...": "Фильтр по имени модели...",
|
||||
"Filter by model...": "Фильтровать по модели...",
|
||||
"Filter by API key...": "Фильтр по API-ключу...",
|
||||
"Filter by name or ID...": "Фильтр по имени или ID...",
|
||||
"Filter by name...": "Фильтр по имени...",
|
||||
"Filter by name, ID, or key...": "Фильтровать по имени, ID или ключу...",
|
||||
"Filter by name...": "Фильтр по имени...",
|
||||
"Filter by price field": "Фильтр по полю цены",
|
||||
"Filter by ratio type": "Фильтровать по типу коэффициента",
|
||||
"Filter by request ID": "Фильтр по ID запроса",
|
||||
@@ -1770,7 +1771,7 @@
|
||||
"footer.columns.related.links.oneApi": "Один API",
|
||||
"footer.columns.related.title": "Связанные проекты",
|
||||
"footer.defaultCopyright": "Все права защищены.",
|
||||
"footer.newapi.projectAttributionSuffix": "Все права защищены. Разработано участниками проекта.",
|
||||
"footer.new\u0061pi.projectAttributionSuffix": "Все права защищены. Разработано участниками проекта.",
|
||||
"For channels added after May 10, 2025, no need to remove \".\" from model names during deployment": "Для каналов, добавленных после 10 мая 2025 г., не нужно удалять \".\" из имён моделей при развёртывании",
|
||||
"For private deployments, format: https://fastgpt.run/api/openapi": "Для частных развертываний, формат: https://fastgpt.run/api/openapi",
|
||||
"Force a syntactically valid JSON response": "Принудительно возвращать синтаксически корректный JSON",
|
||||
@@ -2453,6 +2454,7 @@
|
||||
"Name Suffix": "Суффикс имени",
|
||||
"Name the channel and choose the upstream provider.": "Задайте имя канала и выберите upstream-провайдера.",
|
||||
"Name the channel, choose the provider, configure API access, and set credentials.": "Задайте имя канала, выберите провайдера, настройте доступ к API и учетные данные.",
|
||||
"Name, provider type, and availability.": "Название, тип провайдера и доступность.",
|
||||
"name@example.com": "name@example.com",
|
||||
"Native format": "Собственный формат",
|
||||
"Need a redemption code?": "Нужен код активации?",
|
||||
@@ -3102,6 +3104,7 @@
|
||||
"Public rankings page based on live usage data.": "Публичная страница рейтингов на основе реальных данных использования.",
|
||||
"Publish Date": "Дата публикации",
|
||||
"Published": "Опубликовано",
|
||||
"Published models, groups, and model remapping rules.": "Опубликованные модели, группы и правила переназначения моделей.",
|
||||
"Published:": "Опубликовано:",
|
||||
"Pull": "Загрузить",
|
||||
"Pull model": "Загрузить модель",
|
||||
|
||||
Reference in New Issue
Block a user