单机可显示即将上映天数
This commit is contained in:
@@ -114,6 +114,7 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
|
|||||||
const [aiDefaultMessageWithVideo, setAiDefaultMessageWithVideo] = useState('');
|
const [aiDefaultMessageWithVideo, setAiDefaultMessageWithVideo] = useState('');
|
||||||
const [showDetailPanel, setShowDetailPanel] = useState(false);
|
const [showDetailPanel, setShowDetailPanel] = useState(false);
|
||||||
const [showImageViewer, setShowImageViewer] = useState(false);
|
const [showImageViewer, setShowImageViewer] = useState(false);
|
||||||
|
const [showUpcomingInfo, setShowUpcomingInfo] = useState(false); // 控制即将上映倒计时的显示
|
||||||
|
|
||||||
// 检查AI功能是否启用
|
// 检查AI功能是否启用
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -276,8 +277,13 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
|
|||||||
);
|
);
|
||||||
|
|
||||||
const handleClick = useCallback(() => {
|
const handleClick = useCallback(() => {
|
||||||
// 即将上映的电影不跳转
|
// 即将上映的电影:单击显示上映倒计时提示,不跳转
|
||||||
if (isUpcoming) {
|
if (isUpcoming) {
|
||||||
|
setShowUpcomingInfo(true);
|
||||||
|
// 2秒后自动隐藏
|
||||||
|
setTimeout(() => {
|
||||||
|
setShowUpcomingInfo(false);
|
||||||
|
}, 2000);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -659,7 +665,9 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div
|
<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}
|
onClick={handleClick}
|
||||||
{...longPressProps}
|
{...longPressProps}
|
||||||
style={{
|
style={{
|
||||||
@@ -777,7 +785,9 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
|
|||||||
{isUpcoming && daysUntilRelease !== null ? (
|
{isUpcoming && daysUntilRelease !== null ? (
|
||||||
<div
|
<div
|
||||||
data-button="true"
|
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={{
|
style={{
|
||||||
WebkitUserSelect: 'none',
|
WebkitUserSelect: 'none',
|
||||||
userSelect: 'none',
|
userSelect: 'none',
|
||||||
|
|||||||
Reference in New Issue
Block a user