单机可显示即将上映天数

This commit is contained in:
mtvpls
2026-02-08 14:40:19 +08:00
parent 30c3fe1910
commit b5177833c3

View File

@@ -114,6 +114,7 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
const [aiDefaultMessageWithVideo, setAiDefaultMessageWithVideo] = useState('');
const [showDetailPanel, setShowDetailPanel] = useState(false);
const [showImageViewer, setShowImageViewer] = useState(false);
const [showUpcomingInfo, setShowUpcomingInfo] = useState(false); // 控制即将上映倒计时的显示
// 检查AI功能是否启用
useEffect(() => {
@@ -276,8 +277,13 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
);
const handleClick = useCallback(() => {
// 即将上映的电影不跳转
// 即将上映的电影:单击显示上映倒计时提示,不跳转
if (isUpcoming) {
setShowUpcomingInfo(true);
// 2秒后自动隐藏
setTimeout(() => {
setShowUpcomingInfo(false);
}, 2000);
return;
}
@@ -659,7 +665,9 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
return (
<>
<div
className={`group relative w-full rounded-lg bg-transparent transition-all duration-300 ease-in-out hover:scale-[1.05] hover:z-[500] ${isUpcoming ? 'cursor-default' : 'cursor-pointer'}`}
className={`group relative w-full rounded-lg bg-transparent transition-all duration-300 ease-in-out hover:scale-[1.05] hover:z-[500] ${isUpcoming ? 'cursor-default' : 'cursor-pointer'} ${
showUpcomingInfo ? 'scale-[1.05] z-[500]' : ''
}`}
onClick={handleClick}
{...longPressProps}
style={{
@@ -777,7 +785,9 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
{isUpcoming && daysUntilRelease !== null ? (
<div
data-button="true"
className='absolute inset-0 flex items-center justify-center opacity-0 transition-all duration-300 ease-in-out delay-75 group-hover:opacity-100'
className={`absolute inset-0 flex items-center justify-center transition-all duration-300 ease-in-out ${
showUpcomingInfo ? 'opacity-100 scale-100' : 'opacity-0 scale-75'
}`}
style={{
WebkitUserSelect: 'none',
userSelect: 'none',