修复 chatbox 更新视频,主界面不更新问题

This commit is contained in:
北枳 2025-08-28 18:16:57 +08:00
parent 381a935dd0
commit 0a91cccef5
4 changed files with 28 additions and 15 deletions

View File

@ -221,12 +221,9 @@ export default function CreateToVideo2() {
{/* 底部信息 */}
<div className="absolute bottom-0 left-0 right-0 p-4">
<div className="flex items-center justify-between">
<h2 className="text-lg font-medium text-white group-hover:text-purple-400 transition-colors duration-300 line-clamp-1">
{project.name || "未命名项目"}
<h2 className="text-lg font-medium text-white line-clamp-1">
{project.name || "Unnamed"}
</h2>
<button className="p-1.5 hover:bg-white/10 rounded-full transition-colors opacity-0 group-hover:opacity-100">
<MoreHorizontal className="w-4 h-4 text-white/80" />
</button>
</div>
</div>
</div>

View File

@ -8,11 +8,13 @@ import React from 'react';
import Link from 'next/link';
import { signInWithGoogle, loginUser } from '@/lib/auth';
import { GradientText } from '@/components/ui/gradient-text';
import { Eye, EyeOff } from 'lucide-react';
export default function Login() {
const [isLoaded, setIsLoaded] = useState(false);
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [showPassword, setShowPassword] = useState(false);
const [isSubmitting, setIsSubmitting] = useState(false);
const [formError, setFormError] = useState('');
const [successMessage, setSuccessMessage] = useState('');
@ -117,14 +119,24 @@ export default function Login() {
</div>
<div className="mb-3">
<label className="form-label"></label>
<input
placeholder="请输入密码"
required
className="form-control"
type="password"
value={password}
onChange={(e) => setPassword(e.target.value)}
/>
<div className="relative">
<input
placeholder="请输入密码"
required
className="form-control pr-10"
type={showPassword ? "text" : "password"}
value={password}
onChange={(e) => setPassword(e.target.value)}
/>
<button
type="button"
data-alt="toggle-password-visibility"
className="absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-300 focus:outline-none"
onClick={() => setShowPassword(!showPassword)}
>
{!showPassword ? <EyeOff size={20} /> : <Eye size={20} />}
</button>
</div>
<div className="d-flex justify-content-end mt-1">
<a className="auth-link small" href="/forgot-password" data-discover="true"></a>
</div>

View File

@ -422,9 +422,11 @@ export const MediaViewer = React.memo(function MediaViewer({
// 渲染视频内容
const renderVideoContent = () => {
const urls = taskObject.videos.data[currentSketchIndex].urls ? taskObject.videos.data[currentSketchIndex].urls.join(',') : '';
return (
<div
className="relative w-full h-full rounded-lg group"
key={`render-video-${urls}`}
>
{/* 背景模糊的图片 */}
{taskObject.videos.data[currentSketchIndex].video_status !== 1 && (
@ -551,6 +553,7 @@ export const MediaViewer = React.memo(function MediaViewer({
return (
<div
className="relative w-full h-full rounded-lg group"
key={`render-sketch-${currentSketch.url}`}
>
{/* 状态 */}
{currentSketch.status === 0 && (

View File

@ -158,10 +158,11 @@ export function ThumbnailGrid({
// 渲染视频阶段的缩略图
const renderVideoThumbnails = () => (
taskObject.videos.data.map((video, index) => {
const urls: string = video.urls ? video.urls.join(',') : '';
return (
<div
key={`video-${index}`}
key={`video-${urls}`}
className={`relative aspect-video rounded-lg overflow-hidden
${currentSketchIndex === index ? 'ring-2 ring-blue-500 z-10' : 'hover:ring-2 hover:ring-blue-500/50'}`}
onClick={() => !isDragging && onSketchSelect(index)}
@ -229,7 +230,7 @@ export function ThumbnailGrid({
return (
<div
key={`sketch-${index}`}
key={`sketch-${sketch.url}`}
className={`relative aspect-video rounded-lg overflow-hidden
${currentSketchIndex === index ? 'ring-2 ring-blue-500 z-10' : 'hover:ring-2 hover:ring-blue-500/50'}`}
onClick={() => !isDragging && onSketchSelect(index)}