forked from 77media/video-flow
更新 tab分类
This commit is contained in:
parent
67c83ff793
commit
3b97e4ea19
@ -30,7 +30,16 @@ const FamousTemplate: React.FC<FamousTemplateProps> = ({ showTabs = true }) => {
|
||||
const [isItemGenerating, setIsItemGenerating] = useState<{ [key: string]: boolean }>({})
|
||||
const [activeTemplateId, setActiveTemplateId] = useState<string | null>(null)
|
||||
const [isPreviewReady, setIsPreviewReady] = useState(false)
|
||||
const [activeTab, setActiveTab] = useState<"all" | "music" | "animation" | "fantasy">("all")
|
||||
const [activeTab, setActiveTab] = useState<string>("all")
|
||||
const tabMap = {
|
||||
all: "all",
|
||||
narrative: "narrative",
|
||||
music_video: "music video",
|
||||
education: "education",
|
||||
commercial: "commercial",
|
||||
"2d_anime": "2d anime",
|
||||
"3d_anime": "3d anime",
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
void getTemplateStoryList()
|
||||
@ -52,7 +61,7 @@ const FamousTemplate: React.FC<FamousTemplateProps> = ({ showTabs = true }) => {
|
||||
</h2>
|
||||
{showTabs && (
|
||||
<div data-alt="template-tabs" className={`flex flex-wrap items-center gap-2 ${isDesktop ? 'ml-4' : 'ml-0'}`}>
|
||||
{(["all", "music", "animation", "fantasy"] as const).map((tab) => (
|
||||
{(["all", "narrative", "music_video", "education", "commercial", "2d_anime", "3d_anime"] as const).map((tab) => (
|
||||
<button
|
||||
key={tab}
|
||||
type="button"
|
||||
@ -64,7 +73,7 @@ const FamousTemplate: React.FC<FamousTemplateProps> = ({ showTabs = true }) => {
|
||||
: "border-white/20 text-white/80 hover:border-white/40 hover:bg-white/10"
|
||||
}`}
|
||||
>
|
||||
{tab.toUpperCase()}
|
||||
{tabMap[tab as keyof typeof tabMap].toUpperCase()}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
|
||||
@ -9,7 +9,6 @@ import { WandSparkles, RectangleHorizontal, RectangleVertical } from 'lucide-rea
|
||||
import { Dropdown, Tooltip } from 'antd';
|
||||
import { LanguageOptions, VideoDurationOptions } from './config-options';
|
||||
import type { ConfigOptions, LanguageValue, VideoDurationValue } from './config-options';
|
||||
import { PortraitAnimeSelector } from './PortraitAnimeSelector';
|
||||
|
||||
interface ConfigPanelProps {
|
||||
/** Current configuration options */
|
||||
@ -149,12 +148,6 @@ export const ConfigPanel = ({
|
||||
<RectangleHorizontal className="w-4 h-4" />
|
||||
</button>
|
||||
</div>
|
||||
|
||||
{/* Portrait/Anime selector */}
|
||||
<PortraitAnimeSelector
|
||||
value={configOptions.pcode}
|
||||
onChange={(v) => onConfigChange('pcode', v, true)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user