Browse Source

Merge branch 'feature/find_question' into develop

feature/upgrade_sdk
Dslak 5 years ago
parent
commit
40480f7956
  1. 2
      vds-app/App/components/Button.js
  2. 3
      vds-app/App/components/Variables.js
  3. 1
      vds-app/App/index.js
  4. 2
      vds-app/App/screens/Exam.js
  5. 3
      vds-app/App/screens/Info.js
  6. 14
      vds-app/App/screens/Quiz.js
  7. 2
      vds-app/App/screens/RecapTrueFalse.js
  8. 16
      vds-app/App/screens/Setup.js
  9. 6
      vds-app/App/screens/Splash.js
  10. 2
      vds-app/App/screens/TrueFalse.js
  11. 5
      vds-app/app.json
  12. 8
      vds-app/babel.config.js
  13. 19
      vds-app/package.json

2
vds-app/App/components/Button.js

@ -42,7 +42,7 @@ const styles = StyleSheet.create({
marginTop: 20,
justifyContent: "space-between",
overflow: "hidden",
borderRadius: 20
borderRadius: 10
},
buttonBg: {
flex: 1,

3
vds-app/App/components/Variables.js

@ -50,6 +50,7 @@ export const texts = {
recapTitle: "Riepilogo risposte sbagliate",
infoTitle: "Informazioni App",
setupTitle: "Impostazioni",
setupSubtitle: "Configura le funzionalità dell'app",
dictionaryTitle: "Terminologia",
dictionarySubtitle: "Dizionario ICAO e abbreviazioni",
alphabethTitle: "Alfabeto ICAO",
@ -58,6 +59,7 @@ export const texts = {
version: "Versione",
author: "Autore",
exit: "Esci",
save: "Salva",
exitQuestion: "Vuoi uscire dall'app?",
description: "VDS Quiz è una applicazione che utilizza le 500 domande ufficiali dell'AeCI (Aero Club d'Italia), nella simulazione le domande vengono estrapolate seguendo lo schema ufficiale d'esame:",
source: "PDF Domande ufficiali",
@ -82,6 +84,7 @@ export const texts = {
trueFalse: "Test Vero/Falso",
trueFalseSubtitle: "10 domande casuali con risposte Vero/Falso",
goToQuestion: "Seleziona ad una domanda specifica...",
changeQuestion: "Cambia domanda...",
lens: "\uD83D\uDD0D"
}

1
vds-app/App/index.js

@ -1,4 +1,3 @@
import 'react-native-gesture-handler'
import { createStackNavigator, createAppContainer } from "react-navigation"

2
vds-app/App/screens/Exam.js

@ -110,7 +110,7 @@ class Exam extends React.Component {
AsyncStorage.getItem('setupData').then((value) => {
let setupData = JSON.parse(value)
console.log('handleBackButton setupData',setupData)
//console.log('handleBackButton setupData',setupData)
examScheme.forEach( (elem) => {
let currentSection = setupData.excludeDelta ? allQuestions[elem.section].filter(item => !item.delta) : allQuestions[elem.section]
for(let i=0; i<elem.questions; i++) {

3
vds-app/App/screens/Info.js

@ -156,10 +156,11 @@ class Info extends React.Component {
<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}: Dslak`}</Text>
</Text>
*/}
<Text style={styles.textSmall}>
{texts.description}
</Text>

14
vds-app/App/screens/Quiz.js

@ -49,10 +49,10 @@ const styles = StyleSheet.create({
},
dropdownContainer: {
marginTop: 20,
borderRadius: 20,
borderRadius: 10,
width: "100%",
textAlign: "center",
backgroundColor: colors.black_alpha
backgroundColor: colors.blue
},
dropdown: {
color: colors.white,
@ -64,6 +64,7 @@ const styles = StyleSheet.create({
},
dropdownItem: {
color: colors.white,
backgroundColor: "red",
fontSize: 16,
borderRadius: 10,
textAlign: "center",
@ -105,7 +106,7 @@ class Quiz extends React.Component {
}
bannerError = (e) => {
console.log("Banner error (footer): ", e)
//console.log("Banner error (footer): ", e)
}
componentDidMount() {
@ -120,9 +121,11 @@ class Quiz extends React.Component {
})
}
/*
componentWillUnmount() {
BackHandler.removeEventListener('hardwareBackPress', this.handleBackButton)
}
*/
handleBackButton = () => {
this.props.navigation.navigate("Splash")
@ -240,17 +243,18 @@ class Quiz extends React.Component {
</Text>
<View style={styles.dropdownContainer}>
<Picker
style={styles.dropdown}
itemStyle={styles.dropdownItem}
onValueChange={(itemValue, itemIndex) => this.jumpTo(itemValue, itemIndex)}
>
<Picker.Item key={`itemPlaceholder`} label={texts.goToQuestion} value={0} />
<Picker.Item key={`itemPlaceholder`} label={texts.changeQuestion} value={0} />
{this.state.availableQuestions.map( (item, index) => (
<Picker.Item key={`item${item.id}`} label={`${item.id} - ${item.question}`} value={item.id} />
))}
</Picker>
</View>
</SafeAreaView>

2
vds-app/App/screens/RecapTrueFalse.js

@ -108,7 +108,7 @@ class RecapTrueFalse extends React.Component {
componentDidMount() {
BackHandler.addEventListener('hardwareBackPress', this.handleBackButton)
AsyncStorage.getItem('storeWrongAnswers').then((value) => {
console.log(value)
//console.log(value)
}).done()
}

16
vds-app/App/screens/Setup.js

@ -54,7 +54,7 @@ const styles = StyleSheet.create({
textSmall: {
lineHeight: 23,
marginTop: 15,
borderRadius: 20,
borderRadius: 10,
backgroundColor: colors.white,
borderWidth: 0,
borderColor: colors.white_alpha,
@ -115,6 +115,9 @@ const styles = StyleSheet.create({
checkboxLabel: {
marginLeft: 8,
marginRight: 8
},
button: {
marginTop: 20
}
})
@ -208,7 +211,16 @@ class Setup extends React.Component {
</View>
<View style={styles.button}>
<Button
color={colors.white_alpha2}
hasShadow={true}
hasBg={true}
text={texts.save}
onPress={() => {this.handleBackButton()}
}
/>
</View>
</View>
</ScrollView>

6
vds-app/App/screens/Splash.js

@ -9,6 +9,7 @@ import { trueFalseQuestions } from "../components/TrueFalseQuestions"
const screen = Dimensions.get("window")
const header = require("../assets/header.png")
const pkg = require('../../app.json')
const maxTime = 0 // 10
let interval = null
@ -66,11 +67,11 @@ const styles = StyleSheet.create({
paddingHorizontal: 20
},
headerContainer: {
marginTop: 0,
marginTop: 20,
alignItems: "center",
justifyContent: "center",
width: "100%",
height: 200
height: 150
},
header: {
width: "100%"
@ -236,6 +237,7 @@ class Splash extends React.Component {
/>
<Button
text={texts.setupTitle}
subtitle={`(${texts.setupSubtitle})`}
isBig={false}
hasBg={true}
noPadding={true}

2
vds-app/App/screens/TrueFalse.js

@ -112,7 +112,7 @@ class Quiz extends React.Component {
}
bannerError = (e) => {
console.log("Banner error (footer): ", e)
//console.log("Banner error (footer): ", e)
}
componentDidMount() {

5
vds-app/app.json

@ -3,12 +3,11 @@
"name": "VDS Quiz",
"slug": "VDS-Quiz",
"privacy": "public",
"sdkVersion": "38.0.0",
"platforms": [
"ios",
"android"
],
"version": "3.5.51",
"version": "3.5.55",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
@ -26,7 +25,7 @@
"icon": "./assets/icon.png",
"package": "com.dslak.vdsquiz",
"permissions": [],
"versionCode": 18,
"versionCode": 19,
"config": {
"googleMobileAdsAppId": "ca-app-pub-4145771316565790~1876877627"
}

8
vds-app/babel.config.js

@ -1,6 +1,6 @@
module.exports = function(api) {
api.cache(true);
api.cache(true)
return {
presets: ['babel-preset-expo'],
};
};
presets: ['babel-preset-expo']
}
}

19
vds-app/package.json

@ -10,19 +10,20 @@
"lint": "eslint ."
},
"dependencies": {
"expo": "^35.0.1",
"expo-ads-admob": "~7.0.0",
"expo-permissions": "^7.0.0",
"react": "^16.8.3",
"expo": "^38.0.0",
"expo-ads-admob": "~8.2.1",
"expo-permissions": "~9.0.1",
"react": "16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-admob": "^1.3.2",
"react-native-gesture-handler": "^1.3.0",
"react-native-reanimated": "^1.2.0",
"react-native-screens": "~1.0.0-alpha.23",
"react-navigation": "^3.6.1"
"react-native-gesture-handler": "~1.6.0",
"react-native-reanimated": "~1.9.0",
"react-native-screens": "~2.9.0",
"react-navigation": "^3.6.1",
"remove-console-logs": "^0.1.0"
},
"devDependencies": {
"babel-preset-expo": "^7.0.0",
"babel-preset-expo": "^8.2.3",
"eslint": "^5.16.0",
"eslint-config-handlebarlabs": "^0.0.3",
"prettier": "^1.16.4"

Loading…
Cancel
Save