forked from 77media/video-flow
Merge branch 'prod' into dev
This commit is contained in:
commit
52fe1b3599
@ -1,11 +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_CUTAPI_URL = http://77.smartcut.py.qikongjian.com
|
||||
# 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.6
|
||||
NEXT_PUBLIC_ERROR_CONFIG = 0.2
|
||||
@ -27,6 +27,7 @@ import {
|
||||
Popconfirm,
|
||||
Image,
|
||||
Popover,
|
||||
Switch,
|
||||
} from "antd";
|
||||
import { UploadOutlined } from "@ant-design/icons";
|
||||
import { StoryTemplateEntity } from "@/app/service/domain/Entities";
|
||||
@ -114,16 +115,20 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
|
||||
const [isItemGenerating, setIsItemGenerating] = useState<{[key: string]: boolean}>({}); // 道具AI生成按钮的加载状态
|
||||
|
||||
// 配置选项状态 - 整合所有配置项到一个对象
|
||||
const [configOptions, setConfigOptions] = useState<{
|
||||
type ConfigOptions = {
|
||||
mode: "auto" | "manual";
|
||||
resolution: "720p" | "1080p" | "4k";
|
||||
language: string;
|
||||
videoDuration: string;
|
||||
}>({
|
||||
expansion_mode: boolean;
|
||||
};
|
||||
|
||||
const [configOptions, setConfigOptions] = useState<ConfigOptions>({
|
||||
mode: "auto",
|
||||
resolution: "720p",
|
||||
language: "english",
|
||||
videoDuration: "1min",
|
||||
expansion_mode: false,
|
||||
});
|
||||
|
||||
// 从 localStorage 初始化配置
|
||||
@ -137,6 +142,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
|
||||
resolution: parsed.resolution || "720p",
|
||||
language: parsed.language || "english",
|
||||
videoDuration: parsed.videoDuration || "1min",
|
||||
expansion_mode: typeof parsed.expansion_mode === 'boolean' ? parsed.expansion_mode : false,
|
||||
});
|
||||
} catch (error) {
|
||||
console.warn('解析保存的配置失败,使用默认配置:', error);
|
||||
@ -144,7 +150,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
|
||||
}
|
||||
}, []);
|
||||
|
||||
const onConfigChange = (key: string, value: string) => {
|
||||
const onConfigChange = <K extends keyof ConfigOptions>(key: K, value: ConfigOptions[K]) => {
|
||||
setConfigOptions((prev) => ({
|
||||
...prev,
|
||||
[key]: value,
|
||||
@ -177,6 +183,7 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
|
||||
resolution: configOptions.resolution,
|
||||
language: configOptions.language,
|
||||
video_duration: configOptions.videoDuration,
|
||||
expansion_mode: configOptions.expansion_mode,
|
||||
};
|
||||
|
||||
// 调用创建剧集API
|
||||
@ -378,6 +385,27 @@ export function ChatInputBox({ noData }: { noData: boolean }) {
|
||||
<span className="text-sm">{LauguageOptions.find((option) => option.value === configOptions.language)?.code}</span>
|
||||
</button>
|
||||
</Dropdown>
|
||||
|
||||
{/* 分隔线 */}
|
||||
<div className="w-px h-4 bg-white/[0.20]"></div>
|
||||
|
||||
{/* 剧本扩展开关 */}
|
||||
<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">
|
||||
{/* <span className="text-sm text-white/80">Script Expansion</span> */}
|
||||
<Switch
|
||||
size="small"
|
||||
checked={configOptions.expansion_mode}
|
||||
onChange={(checked) => onConfigChange('expansion_mode', checked)}
|
||||
style={{
|
||||
backgroundColor: 'rgba(255,255,255,0.45)',
|
||||
}}
|
||||
/>
|
||||
<span className={`text-xs text-white/50`}>
|
||||
{configOptions.expansion_mode ? 'On' : 'Off'}
|
||||
</span>
|
||||
</div>
|
||||
</Tooltip>
|
||||
</div>
|
||||
|
||||
{/* 右侧Action按钮 */}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user