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 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": "MidjourneyタスクIDでフィルター",
|
||||
"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": "1つの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": "2025 年 5 月 10 日以降に追加されたチャネルの場合、デプロイ時にモデル名から「.」を削除する必要はありません",
|
||||
"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.": "チャンネル名を設定し、上流プロバイダーを選択します。",
|
||||
"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