mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-19 12:27:29 +08:00
feat: 2k/4k with different color
This commit is contained in:
@@ -478,13 +478,16 @@ const EpisodeSelector: React.FC<EpisodeSelectorProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
// 根据分辨率设置不同颜色:1080p及以上为绿色,720p及以下为黄色
|
// 根据分辨率设置不同颜色:2K、4K为紫色,1080p、720p为绿色,其他为黄色
|
||||||
const isHighRes = [
|
const isUltraHigh = ['4K', '2K'].includes(
|
||||||
'4K',
|
videoInfo.quality
|
||||||
'2K',
|
);
|
||||||
'1080p',
|
const isHigh = ['1080p', '720p'].includes(
|
||||||
].includes(videoInfo.quality);
|
videoInfo.quality
|
||||||
const textColorClasses = isHighRes
|
);
|
||||||
|
const textColorClasses = isUltraHigh
|
||||||
|
? 'text-purple-600 dark:text-purple-400'
|
||||||
|
: isHigh
|
||||||
? 'text-green-600 dark:text-green-400'
|
? 'text-green-600 dark:text-green-400'
|
||||||
: 'text-yellow-600 dark:text-yellow-400';
|
: 'text-yellow-600 dark:text-yellow-400';
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user