This commit is contained in:
Developer
2026-03-14 12:27:03 +08:00
parent e9b00d026f
commit fb819798b1
5 changed files with 207 additions and 161 deletions

View File

@@ -18,24 +18,35 @@ const CARD_WIDTH = (width - 14) / 2;
interface Props {
item: LiveRoom;
isLivePulse?: Boolean;
onPress?: () => void;
fullWidth?: boolean;
}
export function LiveCard({ item, onPress }: Props) {
export function LiveCard({
item,
onPress,
fullWidth,
isLivePulse = false,
}: Props) {
const cardWidth = fullWidth ? width - 8 : CARD_WIDTH;
return (
<TouchableOpacity
style={styles.card}
style={[styles.card, { width: cardWidth }]}
onPress={onPress}
activeOpacity={0.85}
>
<View style={styles.thumbContainer}>
<Image
source={{ uri: proxyImageUrl(item.cover) }}
style={styles.thumb}
style={[
styles.thumb,
{ width: cardWidth, height: cardWidth * 0.5625 },
]}
resizeMode="cover"
/>
<View style={styles.liveBadge}>
<LivePulse />
{isLivePulse && <LivePulse />}
<Text style={styles.liveBadgeText}></Text>
</View>
<View style={styles.meta}>