diff --git a/src/components/config/VisualConfigEditor.tsx b/src/components/config/VisualConfigEditor.tsx index f37f22d1..ebd1689f 100644 --- a/src/components/config/VisualConfigEditor.tsx +++ b/src/components/config/VisualConfigEditor.tsx @@ -1140,6 +1140,12 @@ export function VisualConfigEditor({ 'config_management.visual.sections.network.strategy_round_robin' ), }, + { + value: 'weighted-round-robin', + label: t( + 'config_management.visual.sections.network.strategy_weighted_round_robin' + ), + }, { value: 'fill-first', label: t( diff --git a/src/components/config/configSearchIndex.ts b/src/components/config/configSearchIndex.ts index 34d65c78..e39e0526 100644 --- a/src/components/config/configSearchIndex.ts +++ b/src/components/config/configSearchIndex.ts @@ -6,13 +6,7 @@ // JSX in using the same `fieldId`). export type VisualSectionId = - | 'connectivity' - | 'network' - | 'logging' - | 'quota' - | 'streaming' - | 'advanced' - | 'payload'; + 'connectivity' | 'network' | 'logging' | 'quota' | 'streaming' | 'advanced' | 'payload'; export interface ConfigFieldSearchEntry { /** Stable anchor id; matches FieldAnchor's `fieldId` and the rendered DOM id. */ @@ -159,7 +153,7 @@ export const CONFIG_FIELD_SEARCH_INDEX: ConfigFieldSearchEntry[] = [ labelKey: L('sections.network.routing_strategy'), hintKey: L('sections.network.routing_strategy_hint'), yamlKeys: ['routing', 'strategy'], - keywords: ['round-robin', 'fill-first'], + keywords: ['round-robin', 'weighted-round-robin', 'wrr', 'fill-first'], }, { fieldId: 'disableImageGeneration', diff --git a/src/features/authFiles/components/AuthFileDetailsSheet.tsx b/src/features/authFiles/components/AuthFileDetailsSheet.tsx index 61353df5..a50d154c 100644 --- a/src/features/authFiles/components/AuthFileDetailsSheet.tsx +++ b/src/features/authFiles/components/AuthFileDetailsSheet.tsx @@ -15,6 +15,7 @@ import { supportsAuthFileUsingApi, supportsAuthFileWebsockets, } from '@/features/authFiles/constants'; +import { MAX_CREDENTIAL_WEIGHT } from '@/utils/credentialWeight'; import styles from './AuthFileDetailsSheet.module.scss'; /** API 边界归一化补写的派生字段——INFO 视图里只展示后端原始形状,避免重复噪音。 */ @@ -134,7 +135,8 @@ export function AuthFileDetailsSheet(props: AuthFileDetailsSheetProps) { editor?.saving === true || !dirty || !editor?.json || - Boolean(editor?.headersTouched && editor.headersError) + Boolean(editor?.headersTouched && editor.headersError) || + Boolean(editor?.weightError) } > {t('common.save')} @@ -163,12 +165,7 @@ export function AuthFileDetailsSheet(props: AuthFileDetailsSheetProps) { : t('auth_files.prefix_proxy_invalid_content_label')} {editor.json ? ( -