🎨 feat(EditChannel): improve model selection UX, clipboard feedback & rounded styling (#1290)
* Added a dedicated effect to merge origin and selected models, ensuring selected items always remain in the dropdown list. * Enhanced “Copy all models” button: * Shows info message when list is empty. * Displays success / error notification based on copy result. * Unified UI look-and-feel by applying `!rounded-lg` class to inputs, selects, banners and buttons. * i18n: added English translations for new prompts - "No models to copy" - "Model list copied to clipboard" - "Copy failed"
This commit is contained in:
@@ -1734,5 +1734,8 @@
|
|||||||
"该模型存在固定价格与倍率计费方式冲突,请确认选择": "The model has a fixed price and ratio billing method conflict, please confirm the selection",
|
"该模型存在固定价格与倍率计费方式冲突,请确认选择": "The model has a fixed price and ratio billing method conflict, please confirm the selection",
|
||||||
"当前计费": "Current billing",
|
"当前计费": "Current billing",
|
||||||
"修改为": "Modify to",
|
"修改为": "Modify to",
|
||||||
"状态筛选": "Status filter"
|
"状态筛选": "Status filter",
|
||||||
|
"没有模型可以复制": "No models to copy",
|
||||||
|
"模型列表已复制到剪贴板": "Model list copied to clipboard",
|
||||||
|
"复制失败": "Copy failed"
|
||||||
}
|
}
|
||||||
@@ -835,7 +835,16 @@ useEffect(() => {
|
|||||||
<Button
|
<Button
|
||||||
type='tertiary'
|
type='tertiary'
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
if (inputs.models.length === 0) {
|
||||||
|
showInfo(t('没有模型可以复制'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
copy(inputs.models.join(','));
|
copy(inputs.models.join(','));
|
||||||
|
showSuccess(t('模型列表已复制到剪贴板'));
|
||||||
|
} catch (error) {
|
||||||
|
showError(t('复制失败'));
|
||||||
|
}
|
||||||
}}
|
}}
|
||||||
size="large"
|
size="large"
|
||||||
className="!rounded-lg"
|
className="!rounded-lg"
|
||||||
|
|||||||
Reference in New Issue
Block a user