2020-06-21 13:02:23 +02:00
|
|
|
import React from 'react';
|
|
|
|
|
import { createStackNavigator } from '@react-navigation/stack';
|
2022-05-05 22:54:37 +02:00
|
|
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
2020-07-10 15:25:32 +02:00
|
|
|
import { THEME_COLOR } from 'CONSTANTS';
|
2020-11-02 22:50:00 +01:00
|
|
|
import { t } from '@localisation';
|
2023-04-22 23:31:37 +02:00
|
|
|
import useDefaultStyles, { ColoredBlurView } from 'components/Colors';
|
2023-04-22 22:31:54 +02:00
|
|
|
import { StackParams } from 'screens/types';
|
|
|
|
|
import NowPlaying from './overlays/NowPlaying';
|
|
|
|
|
|
|
|
|
|
import RecentAlbums from './stacks/RecentAlbums';
|
|
|
|
|
import Albums from './stacks/Albums';
|
|
|
|
|
import Album from './stacks/Album';
|
2022-01-01 19:09:21 +01:00
|
|
|
import Playlists from './stacks/Playlists';
|
|
|
|
|
import Playlist from './stacks/Playlist';
|
2023-04-22 23:31:37 +02:00
|
|
|
import { StyleSheet } from 'react-native';
|
2020-06-21 13:02:23 +02:00
|
|
|
|
2023-04-22 22:31:54 +02:00
|
|
|
const Stack = createStackNavigator<StackParams>();
|
2020-06-21 13:02:23 +02:00
|
|
|
|
|
|
|
|
function MusicStack() {
|
2021-02-13 15:34:43 +01:00
|
|
|
const defaultStyles = useDefaultStyles();
|
|
|
|
|
|
2020-06-21 13:02:23 +02:00
|
|
|
return (
|
2022-05-05 22:59:32 +02:00
|
|
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
2022-04-09 15:48:01 +02:00
|
|
|
<Stack.Navigator initialRouteName="RecentAlbums" screenOptions={{
|
|
|
|
|
headerTintColor: THEME_COLOR,
|
2022-05-04 22:46:19 +02:00
|
|
|
headerTitleStyle: defaultStyles.stackHeader,
|
|
|
|
|
cardStyle: defaultStyles.view,
|
2023-04-22 23:31:37 +02:00
|
|
|
headerTransparent: true,
|
|
|
|
|
headerBackground: () => <ColoredBlurView style={StyleSheet.absoluteFill} />,
|
2022-04-09 15:48:01 +02:00
|
|
|
}}>
|
2023-04-22 23:31:37 +02:00
|
|
|
<Stack.Screen name="RecentAlbums" component={RecentAlbums} options={{ headerTitle: t('recent-albums'), headerShown: false }} />
|
2022-04-09 15:48:01 +02:00
|
|
|
<Stack.Screen name="Albums" component={Albums} options={{ headerTitle: t('albums') }} />
|
|
|
|
|
<Stack.Screen name="Album" component={Album} options={{ headerTitle: t('album') }} />
|
|
|
|
|
<Stack.Screen name="Playlists" component={Playlists} options={{ headerTitle: t('playlists') }} />
|
|
|
|
|
<Stack.Screen name="Playlist" component={Playlist} options={{ headerTitle: t('playlist') }} />
|
|
|
|
|
</Stack.Navigator>
|
|
|
|
|
<NowPlaying />
|
2022-05-05 22:54:37 +02:00
|
|
|
</GestureHandlerRootView>
|
2020-06-21 13:02:23 +02:00
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default MusicStack;
|