forked from 77media/video-flow
视频时长配置
This commit is contained in:
parent
ee3a866a27
commit
35318c4cb5
@ -1,10 +1,10 @@
|
||||
|
||||
# NEXT_PUBLIC_JAVA_URL = https://77.app.java.auth.qikongjian.com
|
||||
# NEXT_PUBLIC_BASE_URL = https://77.smartvideo.py.qikongjian.com
|
||||
# NEXT_PUBLIC_CUT_URL = https://smartcut.huiying.video
|
||||
NEXT_PUBLIC_JAVA_URL = https://auth.movieflow.ai
|
||||
NEXT_PUBLIC_BASE_URL = https://api.video.movieflow.ai
|
||||
NEXT_PUBLIC_CUT_URL = https://smartcut.movieflow.ai
|
||||
NEXT_PUBLIC_JAVA_URL = https://77.app.java.auth.qikongjian.com
|
||||
NEXT_PUBLIC_BASE_URL = https://77.smartvideo.py.qikongjian.com
|
||||
NEXT_PUBLIC_CUT_URL = https://smartcut.huiying.video
|
||||
# NEXT_PUBLIC_JAVA_URL = https://auth.movieflow.ai
|
||||
# NEXT_PUBLIC_BASE_URL = https://api.video.movieflow.ai
|
||||
# NEXT_PUBLIC_CUT_URL = https://smartcut.movieflow.ai
|
||||
|
||||
# 失败率
|
||||
NEXT_PUBLIC_ERROR_CONFIG = 0.2
|
||||
@ -68,6 +68,13 @@ const LauguageOptions = [
|
||||
{ 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",
|
||||
resolution: "720p",
|
||||
language: "english",
|
||||
videoDuration: "1min",
|
||||
videoDuration: "unlimited",
|
||||
expansion_mode: true,
|
||||
});
|
||||
|
||||
@ -280,7 +287,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
|
||||
{/* 第二行:功能按钮和Action按钮 - 同一行 */}
|
||||
<div className="flex items-center justify-between">
|
||||
{/* 左侧功能按钮区域 */}
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex items-center gap-1">
|
||||
{/* 获取创意按钮
|
||||
<Tooltip
|
||||
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"}>
|
||||
<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
|
||||
size="small"
|
||||
checked={configOptions.expansion_mode}
|
||||
onChange={(checked) => onConfigChange('expansion_mode', checked)}
|
||||
/>
|
||||
</div>
|
||||
<span className={`text-xs text-white/50`}>
|
||||
<span className={`text-xs text-white`}>
|
||||
{configOptions.expansion_mode ? 'On' : 'Off'}
|
||||
</span>
|
||||
</div>
|
||||
</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>
|
||||
|
||||
{/* 右侧Action按钮 */}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user