diff --git a/components/pages/create-video/CreateInput/ConfigPanel.tsx b/components/pages/create-video/CreateInput/ConfigPanel.tsx index a7d730d..0f8ceec 100644 --- a/components/pages/create-video/CreateInput/ConfigPanel.tsx +++ b/components/pages/create-video/CreateInput/ConfigPanel.tsx @@ -6,7 +6,7 @@ import { DownOutlined } from '@ant-design/icons'; import { WandSparkles, RectangleHorizontal, RectangleVertical } from 'lucide-react'; -import { Dropdown, Menu, Tooltip } from 'antd'; +import { Dropdown, Tooltip } from 'antd'; import { LanguageOptions, VideoDurationOptions } from './config-options'; import type { ConfigOptions, LanguageValue, VideoDurationValue } from './config-options'; import { PortraitAnimeSelector } from './PortraitAnimeSelector'; @@ -37,29 +37,17 @@ export const ConfigPanel = ({ isMobile = false, isDesktop = true, }: ConfigPanelProps) => { - /** Language dropdown menu */ - const languageMenu = ( - onConfigChange('language', key as LanguageValue)} - items={LanguageOptions.map((option) => ({ - key: option.value, - label: {option.label}, - }))} - /> - ); + /** Language dropdown menu items */ + const languageMenuItems = LanguageOptions.map((option) => ({ + key: option.value, + label: {option.label}, + })); - /** Duration dropdown menu */ - const durationMenu = ( - onConfigChange('videoDuration', key as VideoDurationValue)} - items={VideoDurationOptions.map((option) => ({ - key: option.value, - label: {option.label}, - }))} - /> - ); + /** Duration dropdown menu items */ + const durationMenuItems = VideoDurationOptions.map((option) => ({ + key: option.value, + label: {option.label}, + })); const currentLanguage = LanguageOptions.find((option) => option.value === configOptions.language); const currentDuration = configOptions.videoDuration === 'unlimited' ? 'auto' : configOptions.videoDuration; @@ -67,7 +55,14 @@ export const ConfigPanel = ({ return (
{/* Language selector */} - + onConfigChange('language', key as LanguageValue), + className: 'bg-[#1a1a1a] border border-white/10' + }} + trigger={['click']} + >
- + onConfigChange('language', key as LanguageValue), + className: 'bg-[#1a1a1a] border border-white/10 max-h-[300px] overflow-y-auto' + }} + trigger={['click']} + > @@ -239,7 +234,14 @@ export function MobileConfigModal({ > Portrait - + onConfigChange('pcode', key), + className: 'bg-[#1a1a1a] border border-white/10' + }} + trigger={['click']} + >
- } + menu={{ + items: [ + { + key: 'character', + icon: , + label: Character, + onClick: () => characterInputRef.current?.click(), + }, + { + key: 'scene', + icon: , + label: Scene, + onClick: () => sceneInputRef.current?.click(), + }, + { + key: 'prop', + icon: , + label: Prop, + onClick: () => propInputRef.current?.click(), + }, + ], + className: 'bg-[#1a1a1a] border border-white/10' + }} trigger={['click']} >