From 23647f73295b43b38c7a895a5b7324490838cff8 Mon Sep 17 00:00:00 2001 From: James Chen Date: Thu, 28 Aug 2025 17:38:02 +0800 Subject: [PATCH] feat(ui): replace Pressable with TouchableOpacity for non-TV devices in VideoCard component --- components/VideoCard.tv.tsx | 151 +++++++++++++++++++++++++----------- 1 file changed, 105 insertions(+), 46 deletions(-) diff --git a/components/VideoCard.tv.tsx b/components/VideoCard.tv.tsx index 4ceb53f..423b097 100644 --- a/components/VideoCard.tv.tsx +++ b/components/VideoCard.tv.tsx @@ -150,18 +150,17 @@ const VideoCard = forwardRef( return ( - - - + {Platform.isTV || deviceType !== 'tv' ? ( + + {isFocused && ( @@ -174,42 +173,102 @@ const VideoCard = forwardRef( )} - {/* 进度条 */} - {isContinueWatching && ( - - - - )} + {/* 进度条 */} + {isContinueWatching && ( + + + + )} - {rate && ( - - - {rate} - - )} - {year && ( - - {year} - - )} - {sourceName && ( - - {sourceName} - - )} + {rate && ( + + + {rate} + + )} + {year && ( + + {year} + + )} + {sourceName && ( + + {sourceName} + + )} + + + {title} + {isContinueWatching && ( + + + 第{episodeIndex}集 已观看 {Math.round((progress || 0) * 100)}% + + + )} + + + ) : ( + + + + {isFocused && ( + + {isContinueWatching && ( + + + 继续观看 + + )} + + )} - - - {title} - {isContinueWatching && ( - - - 第{episodeIndex}集 已观看 {Math.round((progress || 0) * 100)}% - - - )} - - + {/* 进度条 */} + {isContinueWatching && ( + + + + )} + + {rate && ( + + + {rate} + + )} + {year && ( + + {year} + + )} + {sourceName && ( + + {sourceName} + + )} + + + {title} + {isContinueWatching && ( + + + 第{episodeIndex}集 已观看 {Math.round((progress || 0) * 100)}% + + + )} + + + + )} );