chore: opt video channel and platform
This commit is contained in:
@@ -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} />}>
|
||||
|
||||
Reference in New Issue
Block a user