调整videocard样式并修复打开ai问片后无法关闭

This commit is contained in:
mtvpls
2025-12-31 19:28:07 +08:00
parent 8e9eb76d58
commit 42aceb4403
2 changed files with 9 additions and 6 deletions

View File

@@ -106,8 +106,8 @@ export default function AIChatPanel({
};
checkMobile();
// 聚焦输入框
if (inputRef.current) {
// 只在非移动设备上聚焦输入框
if (inputRef.current && window.innerWidth >= 768) {
inputRef.current.focus();
}

View File

@@ -593,8 +593,11 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
label: 'AI问片',
icon: <Sparkles size={20} />,
onClick: () => {
setShowMobileActions(false); // 关闭菜单
setShowAIChat(true);
setShowMobileActions(false);
// 延迟打开 AIChatPanel确保 MobileActionSheet 完全清理完成
setTimeout(() => {
setShowAIChat(true);
}, 250);
},
color: 'default' as const,
});
@@ -860,7 +863,7 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
return false;
}}
>
{actualYear}
{actualYear.slice(-2)}
</div>
)}
@@ -903,7 +906,7 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
{actualEpisodes && actualEpisodes > 1 && orientation === 'vertical' && (
<div
className='absolute top-2 right-2 bg-green-500 text-white text-xs font-semibold px-2 py-1 rounded-md shadow-md transition-all duration-300 ease-out group-hover:scale-110'
className='absolute top-2 right-2 bg-green-500/70 text-white text-xs font-semibold px-2 py-1 rounded-md shadow-md transition-all duration-300 ease-out group-hover:scale-110'
style={{
WebkitUserSelect: 'none',
userSelect: 'none',