视频时长配置

This commit is contained in:
北枳 2025-09-19 16:23:03 +08:00
parent ee3a866a27
commit 35318c4cb5
2 changed files with 51 additions and 11 deletions

View File

@ -1,10 +1,10 @@
# NEXT_PUBLIC_JAVA_URL = https://77.app.java.auth.qikongjian.com NEXT_PUBLIC_JAVA_URL = https://77.app.java.auth.qikongjian.com
# NEXT_PUBLIC_BASE_URL = https://77.smartvideo.py.qikongjian.com NEXT_PUBLIC_BASE_URL = https://77.smartvideo.py.qikongjian.com
# NEXT_PUBLIC_CUT_URL = https://smartcut.huiying.video NEXT_PUBLIC_CUT_URL = https://smartcut.huiying.video
NEXT_PUBLIC_JAVA_URL = https://auth.movieflow.ai # NEXT_PUBLIC_JAVA_URL = https://auth.movieflow.ai
NEXT_PUBLIC_BASE_URL = https://api.video.movieflow.ai # NEXT_PUBLIC_BASE_URL = https://api.video.movieflow.ai
NEXT_PUBLIC_CUT_URL = https://smartcut.movieflow.ai # NEXT_PUBLIC_CUT_URL = https://smartcut.movieflow.ai
# 失败率 # 失败率
NEXT_PUBLIC_ERROR_CONFIG = 0.2 NEXT_PUBLIC_ERROR_CONFIG = 0.2

View File

@ -68,6 +68,13 @@ const LauguageOptions = [
{ value: "indonesian", label: "Indonesian", isVip: false, code:'ID' } { value: "indonesian", label: "Indonesian", isVip: false, code:'ID' }
] ]
const VideoDurationOptions = [
{ value: "8s", label: "8s" },
{ value: "1min", label: "1min" },
{ value: "2min", label: "2min" },
{ value: "unlimited", label: "unlimited" },
];
/**模板故事模式弹窗组件 */ /**模板故事模式弹窗组件 */
/** /**
* *
@ -127,7 +134,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
mode: "auto", mode: "auto",
resolution: "720p", resolution: "720p",
language: "english", language: "english",
videoDuration: "1min", videoDuration: "unlimited",
expansion_mode: true, expansion_mode: true,
}); });
@ -280,7 +287,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
{/* 第二行功能按钮和Action按钮 - 同一行 */} {/* 第二行功能按钮和Action按钮 - 同一行 */}
<div className="flex items-center justify-between"> <div className="flex items-center justify-between">
{/* 左侧功能按钮区域 */} {/* 左侧功能按钮区域 */}
<div className="flex items-center gap-2"> <div className="flex items-center gap-1">
{/* {/*
<Tooltip <Tooltip
title="Get creative ideas for your story" title="Get creative ideas for your story"
@ -391,20 +398,53 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
{/* 剧本扩展开关 */} {/* 剧本扩展开关 */}
<Tooltip title="Enable script expansion" placement="top" trigger={isDesktop ? "hover" : "click"}> <Tooltip title="Enable script expansion" placement="top" trigger={isDesktop ? "hover" : "click"}>
<div data-alt="config-expansion-mode" className="flex items-center gap-2 px-2"> <div data-alt="config-expansion-mode" className="flex items-center gap-1 px-1">
{/* 仅在未选中时显示背景色,避免覆盖选中态 */} {/* 仅在未选中时显示背景色,避免覆盖选中态 */}
<div className={`${configOptions.expansion_mode ? 'bg-transparent' : 'bg-white/40'} rounded-full p-0.5 transition-colors`}> <div className={`${configOptions.expansion_mode ? 'bg-transparent' : 'bg-white/40'} rounded-full transition-colors flex`}>
<Switch <Switch
size="small" size="small"
checked={configOptions.expansion_mode} checked={configOptions.expansion_mode}
onChange={(checked) => onConfigChange('expansion_mode', checked)} onChange={(checked) => onConfigChange('expansion_mode', checked)}
/> />
</div> </div>
<span className={`text-xs text-white/50`}> <span className={`text-xs text-white`}>
{configOptions.expansion_mode ? 'On' : 'Off'} {configOptions.expansion_mode ? 'On' : 'Off'}
</span> </span>
</div> </div>
</Tooltip> </Tooltip>
{/* 分隔线 */}
<div className="w-px h-4 bg-white/[0.20]"></div>
{/* 时长选择 */}
<Dropdown
overlayClassName="duration-dropdown"
menu={{
items: VideoDurationOptions.map((option) => ({
key: option.value,
label: (
<div className={`flex items-center justify-between px-2 py-2 ${
option.value === configOptions.videoDuration
? "bg-white/[0.12] rounded-md"
: ""
}`}>
<span className="text-sm text-white">{option.label}</span>
</div>
),
})),
onClick: ({ key }) => onConfigChange('videoDuration', key as string),
}}
trigger={["click"]}
placement="top"
>
<button
data-alt={`config-video-duration`}
className={`flex items-center gap-1 text-white/80 transition-all duration-200 px-2 py-2`}
>
<Clock className={"w-4 h-4"} />
<span className="text-sm">{configOptions.videoDuration}</span>
</button>
</Dropdown>
</div> </div>
{/* 右侧Action按钮 */} {/* 右侧Action按钮 */}