mirror of
https://github.com/KuekHaoYang/KVideo.git
synced 2026-08-12 23:33:43 +08:00
Enhance MovieCard with hover effects and link handling
This commit is contained in:
@@ -77,7 +77,13 @@ export const MovieCard = memo(function MovieCard({ movie, onMovieClick }: MovieC
|
||||
)}
|
||||
{movie.rate && parseFloat(movie.rate) > 0 && (
|
||||
<div
|
||||
className="absolute top-2 right-2 bg-black/80 px-2.5 py-1.5 flex items-center gap-1.5 rounded-[var(--radius-full)]"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
e.stopPropagation(); // 阻止事件冒泡,防止触发外层卡片的搜索点击
|
||||
window.open(movie.url, '_blank', 'noopener,noreferrer');
|
||||
}}
|
||||
title="在豆瓣中查看"
|
||||
className="absolute top-2 right-2 bg-black/80 hover:bg-black/90 px-2.5 py-1.5 flex items-center gap-1.5 rounded-[var(--radius-full)] z-20 hover:scale-105 transition-all shadow-md"
|
||||
>
|
||||
<Icons.Star size={12} className="text-yellow-400 fill-yellow-400" />
|
||||
<span className="text-xs font-bold text-white">
|
||||
|
||||
Reference in New Issue
Block a user