mirror of
https://github.com/tapframe/NuvioStreaming.git
synced 2026-03-11 17:45:38 +00:00
some fixes
This commit is contained in:
parent
10f6a0a4ee
commit
7da0e22f41
5 changed files with 61 additions and 47 deletions
|
|
@ -8,29 +8,23 @@ import type { RootStackParamList } from '../navigation/AppNavigator';
|
|||
|
||||
type NavigationProp = NativeStackNavigationProp<RootStackParamList>;
|
||||
|
||||
interface NuvioHeaderProps {
|
||||
routeName: string;
|
||||
}
|
||||
|
||||
export const NuvioHeader: React.FC<NuvioHeaderProps> = ({ routeName }) => {
|
||||
export const NuvioHeader = () => {
|
||||
const navigation = useNavigation<NavigationProp>();
|
||||
|
||||
return (
|
||||
<View style={styles.container}>
|
||||
<View style={styles.contentContainer}>
|
||||
<Text style={styles.title}>NUVIO</Text>
|
||||
{routeName === 'Home' && (
|
||||
<TouchableOpacity
|
||||
style={styles.searchButton}
|
||||
onPress={() => navigation.navigate('Search')}
|
||||
>
|
||||
<MaterialCommunityIcons
|
||||
name="magnify"
|
||||
size={28}
|
||||
color={colors.white}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
)}
|
||||
<TouchableOpacity
|
||||
style={styles.searchButton}
|
||||
onPress={() => navigation.navigate('Search')}
|
||||
>
|
||||
<MaterialCommunityIcons
|
||||
name="magnify"
|
||||
size={28}
|
||||
color={colors.white}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -448,8 +448,8 @@ const MainTabs = () => {
|
|||
}}
|
||||
/>
|
||||
),
|
||||
header: () => <NuvioHeader routeName={route.name} />,
|
||||
headerShown: true,
|
||||
header: () => route.name === 'Home' ? <NuvioHeader routeName={route.name} /> : null,
|
||||
headerShown: route.name === 'Home',
|
||||
})}
|
||||
>
|
||||
<Tab.Screen
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {
|
|||
StatusBar,
|
||||
Dimensions,
|
||||
ScrollView,
|
||||
Platform,
|
||||
} from 'react-native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { NavigationProp } from '@react-navigation/native';
|
||||
|
|
@ -61,6 +62,8 @@ const COMMON_GENRES = [
|
|||
'Western'
|
||||
];
|
||||
|
||||
const ANDROID_STATUSBAR_HEIGHT = StatusBar.currentHeight || 0;
|
||||
|
||||
const DiscoverScreen = () => {
|
||||
const navigation = useNavigation<NavigationProp<RootStackParamList>>();
|
||||
const [selectedCategory, setSelectedCategory] = useState<Category>(CATEGORIES[0]);
|
||||
|
|
@ -79,14 +82,15 @@ const DiscoverScreen = () => {
|
|||
header: {
|
||||
paddingHorizontal: 16,
|
||||
paddingVertical: 12,
|
||||
paddingTop: Platform.OS === 'android' ? ANDROID_STATUSBAR_HEIGHT + 12 : 12,
|
||||
borderBottomWidth: 1,
|
||||
borderBottomColor: 'rgba(255,255,255,0.1)',
|
||||
backgroundColor: colors.darkBackground,
|
||||
},
|
||||
headerContent: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
headerTitle: {
|
||||
fontSize: 32,
|
||||
|
|
@ -95,15 +99,8 @@ const DiscoverScreen = () => {
|
|||
color: colors.white,
|
||||
},
|
||||
searchButton: {
|
||||
padding: 8,
|
||||
},
|
||||
searchIconContainer: {
|
||||
width: 44,
|
||||
height: 44,
|
||||
borderRadius: 22,
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
backgroundColor: colors.transparentLight,
|
||||
padding: 4,
|
||||
marginLeft: 16,
|
||||
},
|
||||
categoryContainer: {
|
||||
paddingVertical: 12,
|
||||
|
|
@ -486,13 +483,12 @@ const DiscoverScreen = () => {
|
|||
onPress={handleSearchPress}
|
||||
style={styles.searchButton}
|
||||
>
|
||||
<View style={styles.searchIconContainer}>
|
||||
<MaterialIcons
|
||||
name="search"
|
||||
size={24}
|
||||
color={colors.white}
|
||||
/>
|
||||
</View>
|
||||
<MaterialIcons
|
||||
name="search"
|
||||
size={24}
|
||||
color={colors.white}
|
||||
style={{ opacity: 0.7 }}
|
||||
/>
|
||||
</TouchableOpacity>
|
||||
</View>
|
||||
</View>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import {
|
|||
StatusBar,
|
||||
Animated as RNAnimated,
|
||||
ActivityIndicator,
|
||||
Platform,
|
||||
} from 'react-native';
|
||||
import { useNavigation } from '@react-navigation/native';
|
||||
import { NavigationProp } from '@react-navigation/native';
|
||||
|
|
@ -28,6 +29,8 @@ interface LibraryItem extends StreamingContent {
|
|||
lastWatched?: string;
|
||||
}
|
||||
|
||||
const ANDROID_STATUSBAR_HEIGHT = StatusBar.currentHeight || 0;
|
||||
|
||||
const SkeletonLoader = () => {
|
||||
const pulseAnim = React.useRef(new RNAnimated.Value(0)).current;
|
||||
const { width } = useWindowDimensions();
|
||||
|
|
@ -215,7 +218,9 @@ const LibraryScreen = () => {
|
|||
/>
|
||||
|
||||
<View style={styles.header}>
|
||||
<Text style={styles.headerTitle}>Library</Text>
|
||||
<View style={styles.headerContent}>
|
||||
<Text style={styles.headerTitle}>Library</Text>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
<View style={styles.filtersContainer}>
|
||||
|
|
@ -266,9 +271,16 @@ const styles = StyleSheet.create({
|
|||
},
|
||||
header: {
|
||||
paddingHorizontal: 16,
|
||||
paddingTop: 16,
|
||||
paddingBottom: 12,
|
||||
backgroundColor: colors.black,
|
||||
paddingVertical: 12,
|
||||
paddingTop: Platform.OS === 'android' ? ANDROID_STATUSBAR_HEIGHT + 12 : 12,
|
||||
borderBottomWidth: 1,
|
||||
borderBottomColor: 'rgba(255,255,255,0.1)',
|
||||
backgroundColor: colors.darkBackground,
|
||||
},
|
||||
headerContent: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
headerTitle: {
|
||||
fontSize: 32,
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ import { RootStackParamList } from '../navigation/AppNavigator';
|
|||
|
||||
const { width } = Dimensions.get('window');
|
||||
|
||||
const ANDROID_STATUSBAR_HEIGHT = StatusBar.currentHeight || 0;
|
||||
|
||||
interface SettingItemProps {
|
||||
title: string;
|
||||
description: string;
|
||||
|
|
@ -136,9 +138,11 @@ const SettingsScreen: React.FC = () => {
|
|||
<View style={[styles.header, {
|
||||
borderBottomColor: isDarkMode ? colors.border : 'rgba(0,0,0,0.08)'
|
||||
}]}>
|
||||
<Text style={[styles.headerTitle, { color: isDarkMode ? colors.highEmphasis : colors.textDark }]}>
|
||||
Settings
|
||||
</Text>
|
||||
<View style={styles.headerContent}>
|
||||
<Text style={[styles.headerTitle, { color: isDarkMode ? colors.highEmphasis : colors.textDark }]}>
|
||||
Settings
|
||||
</Text>
|
||||
</View>
|
||||
</View>
|
||||
<ScrollView
|
||||
style={styles.scrollView}
|
||||
|
|
@ -254,13 +258,21 @@ const styles = StyleSheet.create({
|
|||
header: {
|
||||
paddingHorizontal: 16,
|
||||
paddingVertical: 12,
|
||||
paddingTop: Platform.OS === 'android' ? ANDROID_STATUSBAR_HEIGHT + 12 : 12,
|
||||
borderBottomWidth: 1,
|
||||
borderBottomColor: 'rgba(0,0,0,0.1)',
|
||||
marginBottom: 8,
|
||||
borderBottomColor: 'rgba(255,255,255,0.1)',
|
||||
backgroundColor: colors.darkBackground,
|
||||
},
|
||||
headerContent: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
headerTitle: {
|
||||
fontSize: 24,
|
||||
fontWeight: '700',
|
||||
fontSize: 32,
|
||||
fontWeight: '800',
|
||||
letterSpacing: 0.5,
|
||||
color: colors.white,
|
||||
},
|
||||
scrollView: {
|
||||
flex: 1,
|
||||
|
|
|
|||
Loading…
Reference in a new issue