mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-09-07 01:56:53 +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 config",
|
||||
"Endpoint Configuration": "Endpoint Configuration",
|
||||
"Endpoint Type": "Endpoint Type",
|
||||
"Endpoint, provider-specific settings, and credentials.": "Endpoint, provider-specific settings, and credentials.",
|
||||
"Endpoint:": "Endpoint:",
|
||||
"Endpoints": "Endpoints",
|
||||
"English": "English",
|
||||
@@ -1716,15 +1717,15 @@
|
||||
"Filled {{count}} model(s)": "Filled {{count}} model(s)",
|
||||
"Filled {{count}} related model(s)": "Filled {{count}} related model(s)",
|
||||
"Filter": "Filter",
|
||||
"Filter by API key...": "Filter by API key...",
|
||||
"Filter by channel ID": "Filter by channel ID",
|
||||
"Filter by group": "Filter by group",
|
||||
"Filter by Midjourney task ID": "Filter by Midjourney task ID",
|
||||
"Filter by model name...": "Filter by model name...",
|
||||
"Filter by model...": "Filter by model...",
|
||||
"Filter by API key...": "Filter by API key...",
|
||||
"Filter by name or ID...": "Filter by name or ID...",
|
||||
"Filter by name...": "Filter by name...",
|
||||
"Filter by name, ID, or key...": "Filter by name, ID, or key...",
|
||||
"Filter by name...": "Filter by name...",
|
||||
"Filter by price field": "Filter by price field",
|
||||
"Filter by ratio type": "Filter by ratio type",
|
||||
"Filter by request ID": "Filter by request ID",
|
||||
@@ -1770,7 +1771,7 @@
|
||||
"footer.columns.related.links.oneApi": "One API",
|
||||
"footer.columns.related.title": "Related Projects",
|
||||
"footer.defaultCopyright": "All rights reserved.",
|
||||
"footer.newapi.projectAttributionSuffix": "All rights reserved. Designed and developed by the project contributors.",
|
||||
"footer.new\u0061pi.projectAttributionSuffix": "All rights reserved. Designed and developed by the project contributors.",
|
||||
"For channels added after May 10, 2025, no need to remove \".\" from model names during deployment": "For channels added after May 10, 2025, no need to remove \".\" from model names during deployment",
|
||||
"For private deployments, format: https://fastgpt.run/api/openapi": "For private deployments, format: https://fastgpt.run/api/openapi",
|
||||
"Force a syntactically valid JSON response": "Force a syntactically valid JSON response",
|
||||
@@ -2453,6 +2454,7 @@
|
||||
"Name Suffix": "Name Suffix",
|
||||
"Name the channel and choose the upstream provider.": "Name the channel and choose the upstream provider.",
|
||||
"Name the channel, choose the provider, configure API access, and set credentials.": "Name the channel, choose the provider, configure API access, and set credentials.",
|
||||
"Name, provider type, and availability.": "Name, provider type, and availability.",
|
||||
"name@example.com": "name@example.com",
|
||||
"Native format": "Native format",
|
||||
"Need a redemption code?": "Need a redemption code?",
|
||||
@@ -3102,6 +3104,7 @@
|
||||
"Public rankings page based on live usage data.": "Public rankings page based on live usage data.",
|
||||
"Publish Date": "Publish Date",
|
||||
"Published": "Published",
|
||||
"Published models, groups, and model remapping rules.": "Published models, groups, and model remapping rules.",
|
||||
"Published:": "Published:",
|
||||
"Pull": "Pull",
|
||||
"Pull model": "Pull model",
|
||||
|
||||
Reference in New Issue
Block a user