From 94e18b8110f01f54772f3d25a416534ff216baf5 Mon Sep 17 00:00:00 2001 From: moux1024 <403053463@qq.com> Date: Tue, 21 Oct 2025 19:44:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E6=8F=8F=E8=BF=B0&banner=E5=B1=95=E5=BC=80=E6=8C=89=E9=92=AE?= =?UTF-8?q?=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/HomeBanner.tsx | 13 +++++----- .../CreateInput/VideoCreationForm.tsx | 25 ++++++++++++++----- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/components/HomeBanner.tsx b/components/HomeBanner.tsx index 90f0e7c..1995b3d 100644 --- a/components/HomeBanner.tsx +++ b/components/HomeBanner.tsx @@ -2,7 +2,7 @@ import { useEffect, useState, useRef } from "react"; import { fetchSettingByCode } from "@/api/serversetting"; -import { X, ChevronUp, ChevronDown } from "lucide-react"; +import { X, ChevronUp, ChevronsDown } from "lucide-react"; import { ChatInputBox } from "@/components/ChatInputBox/ChatInputBox"; import { VideoCreationForm } from '@/components/pages/create-video/CreateInput'; @@ -194,11 +194,6 @@ export default function HomeBanner() { - {isFlying ? ( - - ) : null} {eyebrow ? ( {eyebrow} @@ -235,6 +230,12 @@ export default function HomeBanner() { ) ) : null} + + {isFlying ? ( + + ) : null} {/* Base content - always present under the banner */} diff --git a/components/pages/create-video/CreateInput/VideoCreationForm.tsx b/components/pages/create-video/CreateInput/VideoCreationForm.tsx index 7fa89ab..5a6345b 100644 --- a/components/pages/create-video/CreateInput/VideoCreationForm.tsx +++ b/components/pages/create-video/CreateInput/VideoCreationForm.tsx @@ -81,6 +81,7 @@ export default function VideoCreationForm() { const characterInputRef = useRef(null); const sceneInputRef = useRef(null); const propInputRef = useRef(null); + const mainTextInputRef = useRef(null); const { uploadFile } = useUploadFile(); /** Clear current template related states */ @@ -105,6 +106,9 @@ export default function VideoCreationForm() { setInputPlaceholder(template.generateText || template.name); setTemplateTitle(template.name); handleConfigChange('pcode', template.pcode || ''); + setTimeout(() => { + mainTextInputRef.current?.focus(); + }, 0); }; /** Handle file upload */ @@ -346,10 +350,10 @@ export default function VideoCreationForm() { {/* Main Content Area with Border */}
{templateTitle && ( -
+
{templateTitle}
@@ -374,14 +378,23 @@ export default function VideoCreationForm() { />
)} - + {/* Template Description */} + {inputPlaceholder && ( +
+
{inputPlaceholder}
+
+ )} {/* Text Input Area - Middle */} {shouldShowInput && ( -
+
+ {isTemplateSelected?.freeInput[0].input_name && ( +
{isTemplateSelected?.freeInput[0].input_name}
+ )}