mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
basic queue with skipTo support
This commit is contained in:
@@ -1,10 +1,37 @@
|
||||
import BottomTabNavigator from '@app/navigation/BottomTabNavigator'
|
||||
import NowPlayingQueue from '@app/screens/NowPlayingQueue'
|
||||
import NowPlayingView from '@app/screens/NowPlayingView'
|
||||
import colors from '@app/styles/colors'
|
||||
import font from '@app/styles/font'
|
||||
import { DarkTheme, NavigationContainer } from '@react-navigation/native'
|
||||
import React from 'react'
|
||||
import { createNativeStackNavigator } from 'react-native-screens/native-stack'
|
||||
|
||||
const NowPlayingStack = createNativeStackNavigator()
|
||||
|
||||
const NowPlayingNavigator = () => (
|
||||
<NowPlayingStack.Navigator>
|
||||
<NowPlayingStack.Screen name="main" component={NowPlayingView} options={{ headerShown: false }} />
|
||||
<NowPlayingStack.Screen
|
||||
name="queue"
|
||||
component={NowPlayingQueue}
|
||||
options={{
|
||||
title: 'Queue',
|
||||
headerStyle: {
|
||||
backgroundColor: colors.gradient.high,
|
||||
},
|
||||
headerTitleStyle: {
|
||||
fontSize: 18,
|
||||
fontFamily: font.semiBold,
|
||||
color: colors.text.primary,
|
||||
},
|
||||
headerHideShadow: true,
|
||||
headerTintColor: 'white',
|
||||
}}
|
||||
/>
|
||||
</NowPlayingStack.Navigator>
|
||||
)
|
||||
|
||||
const RootStack = createNativeStackNavigator()
|
||||
|
||||
const theme = { ...DarkTheme }
|
||||
@@ -15,24 +42,14 @@ const RootNavigator = () => (
|
||||
theme={theme}
|
||||
linking={{
|
||||
prefixes: ['trackplayer'],
|
||||
config: {
|
||||
screens: {
|
||||
main: {
|
||||
path: ':/main',
|
||||
},
|
||||
'now-playing': {
|
||||
path: ':/notification.click',
|
||||
},
|
||||
},
|
||||
},
|
||||
}}>
|
||||
<RootStack.Navigator
|
||||
screenOptions={{
|
||||
headerShown: false,
|
||||
}}
|
||||
initialRouteName="main">
|
||||
<RootStack.Screen name="main" component={BottomTabNavigator} />
|
||||
<RootStack.Screen name="now-playing" component={NowPlayingView} />
|
||||
initialRouteName="top">
|
||||
<RootStack.Screen name="top" component={BottomTabNavigator} />
|
||||
<RootStack.Screen name="now-playing" component={NowPlayingNavigator} />
|
||||
</RootStack.Navigator>
|
||||
</NavigationContainer>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user