added licenses and webview for them

added link to github page
This commit is contained in:
austinried
2021-08-26 12:47:56 +09:00
parent b8f04e5426
commit a3fda31743
11 changed files with 24857 additions and 16 deletions

View File

@@ -7,6 +7,7 @@ import SearchResultsView from '@app/screens/SearchResultsView'
import ServerView from '@app/screens/ServerView'
import SettingsView from '@app/screens/Settings'
import SongListView from '@app/screens/SongListView'
import WebViewScreen from '@app/screens/WebViewScreen'
import { selectSettings } from '@app/state/settings'
import { useStore } from '@app/state/store'
import colors from '@app/styles/colors'
@@ -122,6 +123,7 @@ const SearchTab = createTabStackNavigator(Search)
type SettingsStackParamList = {
main: undefined
server?: { id?: string }
web: { uri: string }
}
type ServerScreenNavigationProp = NativeStackNavigationProp<SettingsStackParamList, 'server'>
@@ -130,9 +132,16 @@ type ServerScreenProps = {
route: ServerScreenRouteProp
navigation: ServerScreenNavigationProp
}
const ServerScreen: React.FC<ServerScreenProps> = ({ route }) => <ServerView id={route.params?.id} />
type WebScreenNavigationProp = NativeStackNavigationProp<SettingsStackParamList, 'web'>
type WebScreenRouteProp = RouteProp<SettingsStackParamList, 'web'>
type WebScreenProps = {
route: WebScreenRouteProp
navigation: WebScreenNavigationProp
}
const WebScreen: React.FC<WebScreenProps> = ({ route }) => <WebViewScreen uri={route.params.uri} />
const SettingsStack = createNativeStackNavigator()
const SettingsTab = () => {
@@ -150,6 +159,17 @@ const SettingsTab = () => {
headerTitleStyle: styles.stackheaderTitleStyle,
}}
/>
<SettingsStack.Screen
name="web"
component={WebScreen}
options={{
title: 'Web View',
headerStyle: styles.stackheaderStyle,
headerHideShadow: true,
headerTintColor: 'white',
headerTitleStyle: styles.stackheaderTitleStyle,
}}
/>
</SettingsStack.Navigator>
)
}