From b24a67625cab83bc6d6c4222944a35cc0d8e4b77 Mon Sep 17 00:00:00 2001 From: shinya Date: Sun, 13 Jul 2025 16:24:24 +0800 Subject: [PATCH] feat: 2k/4k with different color --- src/components/EpisodeSelector.tsx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/components/EpisodeSelector.tsx b/src/components/EpisodeSelector.tsx index 3c3edd1..6f48709 100644 --- a/src/components/EpisodeSelector.tsx +++ b/src/components/EpisodeSelector.tsx @@ -478,13 +478,16 @@ const EpisodeSelector: React.FC = ({ ); } else { - // 根据分辨率设置不同颜色:1080p及以上为绿色,720p及以下为黄色 - const isHighRes = [ - '4K', - '2K', - '1080p', - ].includes(videoInfo.quality); - const textColorClasses = isHighRes + // 根据分辨率设置不同颜色:2K、4K为紫色,1080p、720p为绿色,其他为黄色 + const isUltraHigh = ['4K', '2K'].includes( + videoInfo.quality + ); + const isHigh = ['1080p', '720p'].includes( + videoInfo.quality + ); + const textColorClasses = isUltraHigh + ? 'text-purple-600 dark:text-purple-400' + : isHigh ? 'text-green-600 dark:text-green-400' : 'text-yellow-600 dark:text-yellow-400';