diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 90e81fe..07a57e0 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -9666,6 +9666,7 @@ function PlayPageClient() { sourceSearchError={sourceSearchError} backgroundSourcesLoading={backgroundSourcesLoading} precomputedVideoInfo={precomputedVideoInfo} + useLightTextOnBackdrop={!!tmdbBackdrop} onDanmakuSelect={(selection) => handleDanmakuSelect(selection, true)} currentDanmakuSelection={currentDanmakuSelection} onUploadDanmaku={handleUploadDanmaku} @@ -9821,11 +9822,11 @@ function PlayPageClient() { })} {/* 评分数值 */} - + {doubanRating.value.toFixed(1)} {/* 评分人数 */} - + ({doubanRating.count.toLocaleString()}人评价) diff --git a/src/components/EpisodeSelector.tsx b/src/components/EpisodeSelector.tsx index 2c8edb1..e8856fb 100644 --- a/src/components/EpisodeSelector.tsx +++ b/src/components/EpisodeSelector.tsx @@ -62,6 +62,8 @@ interface EpisodeSelectorProps { onUploadDanmaku?: (comments: DanmakuComment[]) => void; /** 观影室房员状态 - 禁用选集和换源,但保留弹幕 */ isRoomMember?: boolean; + /** 外层使用 TMDB 背景图时,提升深色文字对比度 */ + useLightTextOnBackdrop?: boolean; /** 集数过滤配置 */ episodeFilterConfig?: EpisodeFilterConfig | null; onFilterConfigUpdate?: (config: EpisodeFilterConfig) => void; @@ -91,11 +93,39 @@ const EpisodeSelector: React.FC = ({ currentDanmakuSelection, onUploadDanmaku, isRoomMember = false, + useLightTextOnBackdrop = false, episodeFilterConfig = null, onFilterConfigUpdate, onShowToast, }) => { const router = useRouter(); + const mutedTextClass = useLightTextOnBackdrop + ? 'text-white/80' + : 'text-gray-600 dark:text-gray-300'; + const faintTextClass = useLightTextOnBackdrop + ? 'text-white/65' + : 'text-gray-500 dark:text-gray-400'; + const inactiveTabClass = useLightTextOnBackdrop + ? 'text-white/85 hover:text-white bg-white/10 dark:bg-white/5 hover:bg-white/15 dark:hover:bg-white/10' + : 'text-gray-700 hover:text-green-600 bg-black/5 dark:bg-white/5 dark:text-gray-300 dark:hover:text-green-400 hover:bg-black/3 dark:hover:bg-white/3'; + const inactiveActionTextClass = useLightTextOnBackdrop + ? 'text-white/85 hover:text-white' + : 'text-gray-700 hover:text-green-600 dark:text-gray-300 dark:hover:text-green-400'; + const iconButtonClass = useLightTextOnBackdrop + ? 'text-white/85 hover:text-white hover:bg-white/15' + : 'text-gray-700 hover:text-green-600 hover:bg-gray-100 dark:text-gray-300 dark:hover:text-green-400 dark:hover:bg-white/20'; + const inactiveEpisodeClass = useLightTextOnBackdrop + ? 'bg-white/15 text-white border-white/10 hover:bg-white/25 hover:scale-105' + : 'bg-gray-200 text-gray-700 border-transparent hover:bg-gray-300 hover:scale-105 dark:bg-gray-700 dark:text-gray-300 dark:hover:bg-gray-600'; + const sourceTitleClass = useLightTextOnBackdrop + ? 'text-white' + : 'text-gray-900 dark:text-gray-100'; + const sourcePillTextClass = useLightTextOnBackdrop + ? 'text-white/85' + : 'text-gray-700 dark:text-gray-300'; + const disabledTextClass = useLightTextOnBackdrop + ? 'text-white/45 cursor-not-allowed' + : 'text-gray-400 dark:text-gray-500 cursor-not-allowed'; const parseSxxExxTitle = useCallback((title?: string) => { const match = title?.match(/[Ss](\d+)[Ee](\d{1,4}(?:\.\d+)?)/); @@ -683,7 +713,7 @@ const EpisodeSelector: React.FC = ({ ${isRoomMember ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'} ${activeTab === 'episodes' ? 'text-green-600 dark:text-green-400' - : 'text-gray-700 hover:text-green-600 bg-black/5 dark:bg-white/5 dark:text-gray-300 dark:hover:text-green-400 hover:bg-black/3 dark:hover:bg-white/3' + : inactiveTabClass } `.trim()} > @@ -699,7 +729,7 @@ const EpisodeSelector: React.FC = ({ ${isRoomMember ? 'cursor-not-allowed opacity-50' : 'cursor-pointer'} ${activeTab === 'sources' ? 'text-green-600 dark:text-green-400' - : 'text-gray-700 hover:text-green-600 bg-black/5 dark:bg-white/5 dark:text-gray-300 dark:hover:text-green-400 hover:bg-black/3 dark:hover:bg-white/3' + : inactiveTabClass } `.trim()} > @@ -713,7 +743,7 @@ const EpisodeSelector: React.FC = ({ className={`flex-1 py-3 px-6 text-center cursor-pointer transition-all duration-200 font-medium ${activeTab === 'danmaku' ? 'text-green-600 dark:text-green-400' - : 'text-gray-700 hover:text-green-600 bg-black/5 dark:bg-white/5 dark:text-gray-300 dark:hover:text-green-400 hover:bg-black/3 dark:hover:bg-white/3' + : inactiveTabClass } `.trim()} > @@ -758,7 +788,7 @@ const EpisodeSelector: React.FC = ({ className={`w-20 relative py-2 text-sm font-medium transition-colors whitespace-nowrap flex-shrink-0 text-center ${isActive ? 'text-green-500 dark:text-green-400' - : 'text-gray-700 hover:text-green-600 dark:text-gray-300 dark:hover:text-green-400' + : inactiveActionTextClass } `.trim()} > @@ -773,7 +803,7 @@ const EpisodeSelector: React.FC = ({ {/* 向上/向下按钮 */} {/* 集数屏蔽配置按钮 */}