chore: opt video channel and platform

This commit is contained in:
feitianbubu
2025-07-22 17:36:38 +08:00
parent 057e551059
commit 7bc9192f3f
8 changed files with 45 additions and 66 deletions

View File

@@ -39,6 +39,7 @@ import {
Sparkles
} from 'lucide-react';
import { TASK_ACTION_GENERATE, TASK_ACTION_TEXT_GENERATE } from '../../../constants/common.constant';
import { CHANNEL_OPTIONS } from '../../../constants/channel.constants';
const colors = [
'amber',
@@ -121,6 +122,14 @@ const renderType = (type, t) => {
};
const renderPlatform = (platform, t) => {
let option = CHANNEL_OPTIONS.find(opt => String(opt.value) === String(platform));
if (option) {
return (
<Tag color={option.color} shape='circle' prefixIcon={<Video size={14} />}>
{option.label}
</Tag>
);
}
switch (platform) {
case 'suno':
return (
@@ -128,18 +137,6 @@ const renderPlatform = (platform, t) => {
Suno
</Tag>
);
case 'kling':
return (
<Tag color='orange' shape='circle' prefixIcon={<Video size={14} />}>
Kling
</Tag>
);
case 'jimeng':
return (
<Tag color='purple' shape='circle' prefixIcon={<Video size={14} />}>
Jimeng
</Tag>
);
default:
return (
<Tag color='white' shape='circle' prefixIcon={<HelpCircle size={14} />}>