竖向videocard的source name调整到海报右下角

This commit is contained in:
mtvpls
2026-01-17 10:03:45 +08:00
parent dad414045d
commit 12d48c83cb

View File

@@ -963,6 +963,42 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
</div>
)}
{/* 竖向模式:来源名称显示在海报右下角 */}
{orientation === 'vertical' && config.showSourceName && source_name && !cmsData && (
<div
className='absolute bottom-1 right-1 sm:bottom-2 sm:right-2'
style={{
WebkitUserSelect: 'none',
userSelect: 'none',
WebkitTouchCallout: 'none',
} as React.CSSProperties}
onContextMenu={(e) => {
e.preventDefault();
return false;
}}
>
<span
className={`inline-block border rounded px-1 py-0.5 text-[8px] text-white/90 bg-black/60 ${
actualSource === 'xiaoya' ? 'border-blue-500' : actualSource === 'openlist' || actualSource === 'emby' || actualSource?.startsWith('emby_') ? 'border-yellow-500' : origin === 'live' ? 'border-red-500' : 'border-white/60'
}`}
style={{
WebkitUserSelect: 'none',
userSelect: 'none',
WebkitTouchCallout: 'none',
} as React.CSSProperties}
onContextMenu={(e) => {
e.preventDefault();
return false;
}}
>
{origin === 'live' && (
<Radio size={8} className="inline-block text-white/90 mr-0.5" />
)}
{source_name}
</span>
</div>
)}
{/* 豆瓣链接 */}
{config.showDoubanLink && actualDoubanId && actualDoubanId !== 0 && (
<a
@@ -1351,7 +1387,7 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
</div>
)}
{/* 标题与来源 */}
{/* 标题 */}
<div
className='mt-2 text-center'
style={{
@@ -1410,38 +1446,6 @@ const VideoCard = forwardRef<VideoCardHandle, VideoCardProps>(function VideoCard
></div>
</div>
</div>
{config.showSourceName && source_name && !cmsData && (
<span
className='block text-xs text-gray-500 dark:text-gray-400 mt-1'
style={{
WebkitUserSelect: 'none',
userSelect: 'none',
WebkitTouchCallout: 'none',
} as React.CSSProperties}
onContextMenu={(e) => {
e.preventDefault();
return false;
}}
>
<span
className='inline-block border rounded px-2 py-0.5 border-gray-500/60 dark:border-gray-400/60 transition-all duration-300 ease-in-out group-hover:border-green-500/60 group-hover:text-green-600 dark:group-hover:text-green-400'
style={{
WebkitUserSelect: 'none',
userSelect: 'none',
WebkitTouchCallout: 'none',
} as React.CSSProperties}
onContextMenu={(e) => {
e.preventDefault();
return false;
}}
>
{origin === 'live' && (
<Radio size={12} className="inline-block text-gray-500 dark:text-gray-400 mr-1.5" />
)}
{source_name}
</span>
</span>
)}
</div>
</>
)}