You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
133 lines
2.9 KiB
133 lines
2.9 KiB
6 years ago
|
import React from "react"
|
||
|
import { View, StyleSheet, StatusBar, Text, SafeAreaView, Dimensions, Image, BackHandler, Linking} from "react-native"
|
||
|
|
||
|
import { Button, ButtonContainer } from "../components/Button"
|
||
|
import { colors, texts } from "../components/Variables"
|
||
|
|
||
|
const screen = Dimensions.get("window")
|
||
|
const header = require("../assets/header.png")
|
||
|
|
||
|
const pkg = require('../../app.json')
|
||
|
|
||
|
const currentInfo = {
|
||
|
correct: "aaa",
|
||
|
wrong: "aaa"
|
||
|
}
|
||
|
|
||
|
|
||
|
const styles = StyleSheet.create({
|
||
|
container: {
|
||
|
backgroundColor: colors.dark_blue,
|
||
|
flex: 1
|
||
|
},
|
||
|
safearea: {
|
||
|
flex: 1,
|
||
|
marginTop: 0,
|
||
|
justifyContent: "space-between",
|
||
|
paddingHorizontal: 20
|
||
|
},
|
||
|
headerContainer: {
|
||
|
marginTop: -40,
|
||
|
alignItems: "center",
|
||
|
justifyContent: "center",
|
||
|
width: "100%",
|
||
|
height: screen.width/1.5
|
||
|
},
|
||
|
header: {
|
||
|
width: "100%"
|
||
|
},
|
||
|
button: {
|
||
|
position: "absolute",
|
||
|
bottom: 40,
|
||
|
left: 40,
|
||
|
width: screen.width-80
|
||
|
},
|
||
|
box: {
|
||
|
width: screen.width-40,
|
||
|
},
|
||
|
text: {
|
||
|
color: colors.white,
|
||
|
fontSize: 22,
|
||
|
textAlign: "center",
|
||
|
fontWeight: "400",
|
||
|
lineHeight: 40,
|
||
|
textShadowColor: 'rgba(0, 0, 0, 0.75)',
|
||
|
textShadowOffset: {width: -1, height: 1},
|
||
|
textShadowRadius: 10
|
||
|
},
|
||
|
textSmall: {
|
||
|
fontSize: 18,
|
||
|
color: colors.white,
|
||
|
fontWeight: "400",
|
||
|
textAlign: "center",
|
||
|
paddingHorizontal: 20,
|
||
|
paddingVertical: 20,
|
||
|
textShadowColor: 'rgba(0, 0, 0, 0.75)',
|
||
|
textShadowOffset: {width: -1, height: 1},
|
||
|
textShadowRadius: 10
|
||
|
},
|
||
|
noPadding: {
|
||
|
paddingVertical: 0,
|
||
|
},
|
||
|
textLabel: {
|
||
|
paddingHorizontal: 20,
|
||
|
paddingVertical: 20
|
||
|
},
|
||
|
bold: {
|
||
|
fontSize: 26,
|
||
|
fontWeight: "600"
|
||
|
}
|
||
|
})
|
||
|
|
||
|
class Info extends React.Component {
|
||
|
|
||
|
state = {}
|
||
|
|
||
|
|
||
|
openURL = (url) => {
|
||
|
Linking.openURL(url).catch((err) => console.error('An error occurred', err))
|
||
|
}
|
||
|
|
||
|
|
||
|
render() {
|
||
|
|
||
|
return (
|
||
|
<View style={styles.container} >
|
||
|
<View style={styles.headerContainer} >
|
||
|
<Image source={header} style={styles.header} resizeMode="contain" />
|
||
|
</View>
|
||
|
|
||
|
<SafeAreaView style={styles.safearea}>
|
||
|
<View style={styles.box}>
|
||
|
<Text style={styles.text}>
|
||
|
<Text style={[styles.textLabel, styles.bold]}>{`${pkg.expo.name}`}</Text>
|
||
|
</Text>
|
||
|
<Text style={styles.text}>
|
||
|
<Text style={styles.textLabel}>{`${texts.version}: ${pkg.expo.version}`}</Text>
|
||
|
</Text>
|
||
|
<Text style={styles.text}>
|
||
|
<Text style={styles.textLabel}>{`${texts.author}: ${pkg.expo.author}`}</Text>
|
||
|
</Text>
|
||
|
|
||
|
<Text style={styles.textSmall}>
|
||
|
{texts.description}
|
||
|
</Text>
|
||
|
|
||
|
<Button
|
||
|
text={texts.source}
|
||
|
subtitle={texts.pdfLinkText}
|
||
|
isBig={false}
|
||
|
onPress={() => this.openURL(texts.pdfLink)}
|
||
|
/>
|
||
|
|
||
|
</View>
|
||
|
|
||
|
</SafeAreaView>
|
||
|
|
||
|
</View>
|
||
|
)
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default Info
|