diff --git a/web/src/i18n/locales/en.json b/web/src/i18n/locales/en.json index ff182af5..ade70ea5 100644 --- a/web/src/i18n/locales/en.json +++ b/web/src/i18n/locales/en.json @@ -1734,5 +1734,8 @@ "该模型存在固定价格与倍率计费方式冲突,请确认选择": "The model has a fixed price and ratio billing method conflict, please confirm the selection", "当前计费": "Current billing", "修改为": "Modify to", - "状态筛选": "Status filter" + "状态筛选": "Status filter", + "没有模型可以复制": "No models to copy", + "模型列表已复制到剪贴板": "Model list copied to clipboard", + "复制失败": "Copy failed" } \ No newline at end of file diff --git a/web/src/pages/Channel/EditChannel.js b/web/src/pages/Channel/EditChannel.js index 6879eb53..2e8baddf 100644 --- a/web/src/pages/Channel/EditChannel.js +++ b/web/src/pages/Channel/EditChannel.js @@ -300,27 +300,27 @@ const EditChannel = (props) => { } }; -useEffect(() => { - // 使用 Map 来避免重复,以 value 为键 - const modelMap = new Map(); - - // 先添加原始模型选项 - originModelOptions.forEach(option => { - modelMap.set(option.value, option); - }); - - // 再添加当前选中的模型(如果不存在) - inputs.models.forEach(model => { - if (!modelMap.has(model)) { - modelMap.set(model, { - label: model, - value: model, - }); - } - }); - - setModelOptions(Array.from(modelMap.values())); -}, [originModelOptions, inputs.models]); + useEffect(() => { + // 使用 Map 来避免重复,以 value 为键 + const modelMap = new Map(); + + // 先添加原始模型选项 + originModelOptions.forEach(option => { + modelMap.set(option.value, option); + }); + + // 再添加当前选中的模型(如果不存在) + inputs.models.forEach(model => { + if (!modelMap.has(model)) { + modelMap.set(model, { + label: model, + value: model, + }); + } + }); + + setModelOptions(Array.from(modelMap.values())); + }, [originModelOptions, inputs.models]); useEffect(() => { fetchModels().then(); @@ -835,7 +835,16 @@ useEffect(() => {