mirror of
https://github.com/austinried/subtracks.git
synced 2026-02-10 15:02:42 +01:00
added licenses and webview for them
added link to github page
This commit is contained in:
@@ -14,7 +14,7 @@ import colors from '@app/styles/colors'
|
||||
import font from '@app/styles/font'
|
||||
import { useNavigation } from '@react-navigation/core'
|
||||
import React, { useCallback, useState } from 'react'
|
||||
import { KeyboardTypeOptions, Modal, Pressable, StatusBar, StyleSheet, Text, View } from 'react-native'
|
||||
import { KeyboardTypeOptions, Linking, Modal, Pressable, StatusBar, StyleSheet, Text, View } from 'react-native'
|
||||
import { ScrollView } from 'react-native-gesture-handler'
|
||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons'
|
||||
|
||||
@@ -281,10 +281,32 @@ const SettingsContent = React.memo(() => {
|
||||
<Button
|
||||
disabled={clearing}
|
||||
style={styles.button}
|
||||
title="Clear image cache"
|
||||
title="Clear Image Cache"
|
||||
onPress={clear}
|
||||
buttonStyle="hollow"
|
||||
/>
|
||||
<Header style={styles.header}>About</Header>
|
||||
<Button
|
||||
disabled={clearing}
|
||||
style={styles.button}
|
||||
title="Project Homepage"
|
||||
onPress={() => Linking.openURL('https://github.com/austinried/subtracks')}
|
||||
buttonStyle="hollow"
|
||||
/>
|
||||
<Button
|
||||
disabled={clearing}
|
||||
style={styles.button}
|
||||
title="Licenses (NPM)"
|
||||
onPress={() => navigation.navigate('web', { uri: 'file:///android_asset/licenses/npm_licenses.txt' })}
|
||||
buttonStyle="hollow"
|
||||
/>
|
||||
<Button
|
||||
disabled={clearing}
|
||||
style={[styles.button, styles.licenseButton]}
|
||||
title="Licenses (Android)"
|
||||
onPress={() => navigation.navigate('web', { uri: 'file:///android_asset/licenses/android_licenses.html' })}
|
||||
buttonStyle="hollow"
|
||||
/>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
@@ -308,9 +330,6 @@ const styles = StyleSheet.create({
|
||||
paddingHorizontal: 20,
|
||||
paddingBottom: 40,
|
||||
},
|
||||
text: {
|
||||
color: 'white',
|
||||
},
|
||||
serverActive: {
|
||||
paddingLeft: 12,
|
||||
},
|
||||
@@ -320,6 +339,14 @@ const styles = StyleSheet.create({
|
||||
button: {
|
||||
marginTop: 16,
|
||||
},
|
||||
licenseButton: {
|
||||
marginHorizontal: 10,
|
||||
flex: 1,
|
||||
},
|
||||
licenses: {
|
||||
flexDirection: 'row',
|
||||
justifyContent: 'space-between',
|
||||
},
|
||||
modalBackdrop: {
|
||||
flex: 1,
|
||||
},
|
||||
@@ -370,6 +397,11 @@ const styles = StyleSheet.create({
|
||||
marginLeft: 15,
|
||||
// backgroundColor: 'green',
|
||||
},
|
||||
text: {
|
||||
color: 'white',
|
||||
fontFamily: font.regular,
|
||||
fontSize: 15,
|
||||
},
|
||||
})
|
||||
|
||||
export default Settings
|
||||
|
||||
10
app/screens/WebViewScreen.tsx
Normal file
10
app/screens/WebViewScreen.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React from 'react'
|
||||
import { WebView } from 'react-native-webview'
|
||||
|
||||
const WebViewScreen: React.FC<{
|
||||
uri: string
|
||||
}> = ({ uri }) => {
|
||||
return <WebView source={{ uri }} />
|
||||
}
|
||||
|
||||
export default WebViewScreen
|
||||
Reference in New Issue
Block a user