diff --git a/vds-app/App/components/Variables.js b/vds-app/App/components/Variables.js index c30216e..8af7d0a 100644 --- a/vds-app/App/components/Variables.js +++ b/vds-app/App/components/Variables.js @@ -37,9 +37,10 @@ export const texts = { materials: "Materiali", meteorology: "Meteorologia e aerologia", physiopathology: "Fisiopatologia del volo", - piloting_techniques: "Tecniche di pilotaggio" + piloting_techniques: "Tecniche di pilotaggio", + restart: "Ricomincia" } -/* + export const examScheme = [ {section: "aerodynamics", questions: 8, points: 3}, {section: "firstAid", questions: 1, points: 2}, @@ -51,14 +52,14 @@ export const examScheme = [ {section: "physiopathology", questions: 1, points: 2}, {section: "pilotingTechniques", questions: 5, points: 4} ] -*/ +/* export const examScheme = [ {section: "aerodynamics", questions: 1, points: 3}, {section: "firstAid", questions: 1, points: 2}, {section: "flightSafety", questions: 1, points: 4}, {section: "instruments", questions: 1, points: 2} ] - +*/ export const credentials = { adMobUnitIDTest: "ca-app-pub-3940256099942544/6300978111", adMobUnitID: "ca-app-pub-4145771316565790/1848957462" //"ca-app-pub-3940256099942544/6300978111" // "ca-app-pub-4145771316565790/1848957462", diff --git a/vds-app/App/screens/QuizIndex.js b/vds-app/App/screens/QuizIndex.js index c28e07f..88c5a2f 100644 --- a/vds-app/App/screens/QuizIndex.js +++ b/vds-app/App/screens/QuizIndex.js @@ -30,7 +30,6 @@ export default ({ navigation }) => ( - navigation.navigate("Quiz", { title: texts.aerodynamics, diff --git a/vds-app/App/screens/Results.js b/vds-app/App/screens/Results.js index cb3a6c7..0774119 100644 --- a/vds-app/App/screens/Results.js +++ b/vds-app/App/screens/Results.js @@ -32,15 +32,30 @@ const styles = StyleSheet.create({ }, box: { position: "absolute", - top: (screen.height/2)-220, - width: screen.width-80, + top: screen.width/4, left: 40, + width: screen.width-80, borderRadius: 15, backgroundColor: colors.white_alpha, borderColor: colors.white, borderWidth: 4, paddingVertical: 30 }, + boxCorrect: { + borderColor: colors.green, + }, + boxWrong: { + borderColor: colors.red, + }, + boxUnsafe: { + borderColor: colors.orange, + }, + button: { + position: "absolute", + bottom: 40, + left: 40, + width: screen.width-80 + }, text: { color: colors.white, fontSize: 22, @@ -101,9 +116,11 @@ class Results extends React.Component { const currentResults = this.props.navigation.getParam("results") const percentage = currentResults.total ? (100/currentResults.total) * currentResults.correct : 0 let resultStyle = currentResults.points >= 80 ? currentResults.points >= 85 ? styles.correct : styles.unsafe : styles.wrong + let boxStyle = currentResults.points >= 80 ? currentResults.points >= 85 ? styles.boxCorrect : styles.boxUnsafe : styles.boxWrong if(!currentResults.isExam) { resultStyle = percentage >= 80 ? percentage >= 85 ? styles.correct : styles.unsafe : styles.wrong + boxStyle = percentage >= 80 ? percentage >= 85 ? styles.boxCorrect : styles.boxUnsafe : styles.boxWrong } console.log(currentResults) @@ -124,7 +141,7 @@ class Results extends React.Component { - + {`${texts.corrects}: ${currentResults.correct}`} @@ -145,6 +162,19 @@ class Results extends React.Component { } + +