mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
This update removes the writer display from the MovieContent component to streamline the metadata presentation. Additionally, it modifies pointer event handling in the MetadataScreen to ensure proper interaction based on the availability of metadata, enhancing user experience during content loading and display.
59 lines
No EOL
1.6 KiB
TypeScript
59 lines
No EOL
1.6 KiB
TypeScript
import React from 'react';
|
|
import { View, Text, StyleSheet } from 'react-native';
|
|
import { useTheme } from '../../contexts/ThemeContext';
|
|
import { StreamingContent } from '../../types/metadata';
|
|
|
|
interface MovieContentProps {
|
|
metadata: StreamingContent;
|
|
}
|
|
|
|
export const MovieContent: React.FC<MovieContentProps> = ({ metadata }) => {
|
|
const { currentTheme } = useTheme();
|
|
const hasCast = Array.isArray(metadata.cast) && metadata.cast.length > 0;
|
|
const castDisplay = hasCast ? metadata.cast!.slice(0, 5).join(', ') : '';
|
|
|
|
return (
|
|
<View style={styles.container}>
|
|
{/* Additional metadata */}
|
|
<View style={styles.additionalInfo}>
|
|
{metadata.director && (
|
|
<View style={styles.metadataRow}>
|
|
<Text style={[styles.metadataLabel, { color: currentTheme.colors.textMuted }]}>Director:</Text>
|
|
<Text style={[styles.metadataValue, { color: currentTheme.colors.text }]}>{metadata.director}</Text>
|
|
</View>
|
|
)}
|
|
|
|
|
|
{hasCast && (
|
|
<View style={styles.metadataRow}>
|
|
<Text style={[styles.metadataLabel, { color: currentTheme.colors.textMuted }]}>Cast:</Text>
|
|
<Text style={[styles.metadataValue, { color: currentTheme.colors.text }]}>{castDisplay}</Text>
|
|
</View>
|
|
)}
|
|
</View>
|
|
</View>
|
|
);
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
container: {
|
|
paddingHorizontal: 24,
|
|
paddingBottom: 24,
|
|
},
|
|
additionalInfo: {
|
|
gap: 12,
|
|
},
|
|
metadataRow: {
|
|
flexDirection: 'row',
|
|
alignItems: 'flex-start',
|
|
},
|
|
metadataLabel: {
|
|
fontSize: 15,
|
|
width: 70,
|
|
},
|
|
metadataValue: {
|
|
fontSize: 15,
|
|
flex: 1,
|
|
lineHeight: 24,
|
|
},
|
|
});
|