♻️ 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": "Cấu hình điểm cuối",
|
||||
"Endpoint Configuration": "Cấu hình điểm cuối",
|
||||
"Endpoint Type": "Loại điểm cuối",
|
||||
"Endpoint, provider-specific settings, and credentials.": "Endpoint, cài đặt riêng của nhà cung cấp và thông tin xác thực.",
|
||||
"Endpoint:": "Điểm cuối:",
|
||||
"Endpoints": "Điểm cuối",
|
||||
"English": "Tiếng Anh",
|
||||
@@ -1716,15 +1717,15 @@
|
||||
"Filled {{count}} model(s)": "Đã điền {{count}} mô hình",
|
||||
"Filled {{count}} related model(s)": "Đã điền {{count}} mô hình liên quan",
|
||||
"Filter": "Lọc",
|
||||
"Filter by API key...": "Lọc theo khóa API...",
|
||||
"Filter by channel ID": "Lọc theo ID kênh",
|
||||
"Filter by group": "Lọc theo nhóm",
|
||||
"Filter by Midjourney task ID": "Lọc theo ID nhiệm vụ Midjourney",
|
||||
"Filter by model name...": "Lọc theo tên mô hình...",
|
||||
"Filter by model...": "Lọc theo mẫu...",
|
||||
"Filter by API key...": "Lọc theo khóa API...",
|
||||
"Filter by name or ID...": "Lọc theo tên hoặc ID...",
|
||||
"Filter by name...": "Lọc theo tên...",
|
||||
"Filter by name, ID, or key...": "Lọc theo tên, ID hoặc khóa...",
|
||||
"Filter by name...": "Lọc theo tên...",
|
||||
"Filter by price field": "Lọc theo trường giá",
|
||||
"Filter by ratio type": "Lọc theo loại tỷ lệ",
|
||||
"Filter by request ID": "Lọc theo ID yêu cầu",
|
||||
@@ -1770,7 +1771,7 @@
|
||||
"footer.columns.related.links.oneApi": "One API",
|
||||
"footer.columns.related.title": "Các Dự Án Liên Quan",
|
||||
"footer.defaultCopyright": "Bản quyền được bảo lưu.",
|
||||
"footer.newapi.projectAttributionSuffix": "Bản quyền được bảo lưu. Được thiết kế và phát triển bởi các cộng tác viên dự án.",
|
||||
"footer.new\u0061pi.projectAttributionSuffix": "Bản quyền được bảo lưu. Được thiết kế và phát triển bởi các cộng tác viên dự án.",
|
||||
"For channels added after May 10, 2025, no need to remove \".\" from model names during deployment": "Đối với các kênh được thêm sau ngày 10 tháng 5 năm 2025, không cần loại bỏ \".\" khỏi tên mô hình trong quá trình triển khai",
|
||||
"For private deployments, format: https://fastgpt.run/api/openapi": "Đối với các triển khai riêng tư, định dạng: https://fastgpt.run/api/openapi",
|
||||
"Force a syntactically valid JSON response": "Buộc phản hồi JSON hợp lệ về cú pháp",
|
||||
@@ -2453,6 +2454,7 @@
|
||||
"Name Suffix": "Hậu tố tên",
|
||||
"Name the channel and choose the upstream provider.": "Đặt tên kênh và chọn nhà cung cấp upstream.",
|
||||
"Name the channel, choose the provider, configure API access, and set credentials.": "Đặt tên kênh, chọn nhà cung cấp, cấu hình truy cập API và thiết lập thông tin xác thực.",
|
||||
"Name, provider type, and availability.": "Tên, loại nhà cung cấp và trạng thái khả dụng.",
|
||||
"name@example.com": "name@example.com",
|
||||
"Native format": "Định dạng gốc",
|
||||
"Need a redemption code?": "Cần mã đổi thưởng?",
|
||||
@@ -3102,6 +3104,7 @@
|
||||
"Public rankings page based on live usage data.": "Trang bảng xếp hạng công khai dựa trên dữ liệu sử dụng thực.",
|
||||
"Publish Date": "Ngày xuất bản",
|
||||
"Published": "Đã xuất bản",
|
||||
"Published models, groups, and model remapping rules.": "Các mô hình đã xuất bản, nhóm và quy tắc ánh xạ lại mô hình.",
|
||||
"Published:": "Đã xuất bản:",
|
||||
"Pull": "Tải",
|
||||
"Pull model": "Tải mô hình",
|
||||
|
||||
Reference in New Issue
Block a user