From f1318c6aed038cc92ca846e46341b9e221cfe517 Mon Sep 17 00:00:00 2001 From: Arnaud Vergnet Date: Wed, 7 Oct 2020 10:08:07 +0200 Subject: [PATCH] Add new contributor and improve contributors generation --- locales/en.json | 15 ++-- locales/fr.json | 15 ++-- src/screens/About/AboutScreen.tsx | 134 ++++++++++++------------------ 3 files changed, 69 insertions(+), 95 deletions(-) diff --git a/locales/en.json b/locales/en.json index 5be2b21..2b7acc7 100644 --- a/locales/en.json +++ b/locales/en.json @@ -364,13 +364,14 @@ "thanks": "Thanks", "user": { "you": "You ?", - "arnaud": "Student in IR (2020). He is the creator of this beautiful app you use everyday. Some say he is handsome as well.", - "yohan": "Student in IR (2020). He helped to fix bugs. I think he is handsome as well but I don't know him personally.", - "beranger": "Student in AE (2020) and president of the Amicale when the app was created. The app was his idea. He helped a lot to find bugs, new features and communication.", - "celine": "Student in GPE (2020). Without her, everything would be less cute. She helped to write the text, for communication, and also to create the mascot 🦊.", - "damien": "Student in IR (2020) and creator of the 2020 version of the Amicale's website. Thanks to his help, integrating Amicale's services into the app was child's play.", - "titouan": "Student in IR (2020). He helped a lot in finding bugs and new features.", - "theo": "Student in AE (2020). If the app works on iOS, this is all thanks to his help during his numerous tests." + "arnaud": "Student in 4IR (2020). He is the creator of this app you use everyday.", + "docjyj": "Student in 2MIC FAS (2020). He added some new features and fixed some bugs.", + "yohan": "Student in 4IR (2020). He helped to fix bugs and gave some ideas.", + "beranger": "Student in 4AE (2020) and president of the Amicale when the app was created. The app was his idea. He helped a lot to find bugs, new features and communication.", + "celine": "Student in 4GPE (2020). Without her, everything would be less cute. She helped to write the text, for communication, and also to create the mascot 🦊.", + "damien": "Student in 4IR (2020) and creator of the 2020 version of the Amicale's website. Thanks to his help, integrating Amicale's services into the app was child's play.", + "titouan": "Student in 4IR (2020). He helped a lot in finding bugs and new features.", + "theo": "Student in 4AE (2020). If the app works on iOS, this is all thanks to his help during his numerous tests." } }, "feedback": { diff --git a/locales/fr.json b/locales/fr.json index 3f8191f..8d7d17b 100644 --- a/locales/fr.json +++ b/locales/fr.json @@ -364,13 +364,14 @@ "thanks": "Remerciements", "user": { "you": "Toi ?", - "arnaud": "Étudiant en IR (2020). C'est le créateur de cette magnifique application que t'utilises tous les jour. Et il est vraiment BG aussi.", - "yohan": "Étudiant en IR (2020). Il a aidé à corriger des bug. Et j'imagine aussi qu'il est BG mais je le connait pas.", - "beranger": "Étudiant en AE (2020) et Président de l’Amicale au moment de la création et du lancement du projet. L’application, c’était son idée. Il a beaucoup aidé pour trouver des bugs, de nouvelles fonctionnalités et faire de la com.", - "celine": "Étudiante en GPE (2020). Sans elle, tout serait moins mignon. Elle a aidé pour écrire le texte, faire de la com, et aussi à créer la mascotte 🦊.", - "damien": "Étudiant en IR (2020) et créateur de la dernière version du site de l’Amicale. Grâce à son aide, intégrer les services de l’Amicale à l’application a été très simple.", - "titouan": "Étudiant en IR (2020). Il a beaucoup aidé pour trouver des bugs et proposer des nouvelles fonctionnalités.", - "theo": "Étudiant en AE (2020). Si l’application marche sur iOS, c’est grâce à son aide lors de ses nombreux tests." + "arnaud": "Étudiant en 4IR (2020). C'est le créateur de cette application que t' utilises tous les jours.", + "docjyj": "Étudiant en 2MIC FAS (2020). Il a ajouté quelques nouvelles fonctionnalités et corrigé des bugs.", + "yohan": "Étudiant en 4IR (2020). Il a aidé à corriger des bug et a proposé quelques idées.", + "beranger": "Étudiant en 4AE (2020) et Président de l’Amicale au moment de la création et du lancement du projet. L’application, c’était son idée. Il a beaucoup aidé pour trouver des bugs, de nouvelles fonctionnalités et faire de la com.", + "celine": "Étudiante en 4GPE (2020). Sans elle, tout serait moins mignon. Elle a aidé pour écrire le texte, faire de la com, et aussi à créer la mascotte 🦊.", + "damien": "Étudiant en 4IR (2020) et créateur de la dernière version du site de l’Amicale. Grâce à son aide, intégrer les services de l’Amicale à l’application a été très simple.", + "titouan": "Étudiant en 4IR (2020). Il a beaucoup aidé pour trouver des bugs et proposer des nouvelles fonctionnalités.", + "theo": "Étudiant en 4AE (2020). Si l’application marche sur iOS, c’est grâce à son aide lors de ses nombreux tests." } }, "feedback": { diff --git a/src/screens/About/AboutScreen.tsx b/src/screens/About/AboutScreen.tsx index 6549ae5..1d55ac9 100644 --- a/src/screens/About/AboutScreen.tsx +++ b/src/screens/About/AboutScreen.tsx @@ -84,8 +84,8 @@ class AboutScreen extends React.Component { /** * Object containing data relative to major contributors */ - majorContributors: {[key: string]: MemberItemType} = { - arnaud: { + majorContributors: Array = [ + { name: 'Arnaud Vergnet', message: i18n.t('screens.about.user.arnaud'), icon: 'crown', @@ -98,7 +98,18 @@ class AboutScreen extends React.Component { '&body=' + 'Coucou !\n\n', }, - yohan: { + { + name: 'Jean-Yves Saint-Loubert', + message: i18n.t('screens.about.user.docjyj'), + icon: 'xml', + mail: + 'mailto:saint-lo@etud.insa-toulouse.fr?' + + 'subject=' + + 'Application Amicale INSA Toulouse' + + '&body=' + + 'Coucou !\n\n', + }, + { name: 'Yohan Simard', message: i18n.t('screens.about.user.yohan'), icon: 'xml', @@ -110,38 +121,38 @@ class AboutScreen extends React.Component { '&body=' + 'Coucou !\n\n', }, - }; + ]; /** * Object containing data relative to users who helped during development */ - helpfulUsers: {[key: string]: MemberItemType} = { - beranger: { + helpfulUsers: Array = [ + { name: 'Béranger Quintana Y Arciosana', message: i18n.t('screens.about.user.beranger'), icon: 'account-heart', }, - celine: { + { name: 'Céline Tassin', message: i18n.t('screens.about.user.celine'), icon: 'brush', }, - damien: { + { name: 'Damien Molina', message: i18n.t('screens.about.user.damien'), icon: 'web', }, - titouan: { + { name: 'Titouan Labourdette', message: i18n.t('screens.about.user.titouan'), icon: 'shield-bug', }, - theo: { + { name: 'Théo Tami', message: i18n.t('screens.about.user.theo'), icon: 'food-apple', }, - }; + ]; /** * Data to be displayed in the app card @@ -196,79 +207,12 @@ class AboutScreen extends React.Component { /** * Data to be displayed in the team card */ - teamData: Array = [ - { - onPressCallback: () => { - this.onContributorListItemPress(this.majorContributors.arnaud); - }, - icon: this.majorContributors.arnaud.icon, - text: this.majorContributors.arnaud.name, - showChevron: false, - }, - { - onPressCallback: () => { - this.onContributorListItemPress(this.majorContributors.yohan); - }, - icon: this.majorContributors.yohan.icon, - text: this.majorContributors.yohan.name, - showChevron: false, - }, - { - onPressCallback: () => { - const {navigation} = this.props; - navigation.navigate('feedback'); - }, - icon: 'hand-pointing-right', - text: i18n.t('screens.about.user.you'), - showChevron: true, - }, - ]; + teamData: Array; /** * Data to be displayed in the thanks card */ - thanksData: Array = [ - { - onPressCallback: () => { - this.onContributorListItemPress(this.helpfulUsers.beranger); - }, - icon: this.helpfulUsers.beranger.icon, - text: this.helpfulUsers.beranger.name, - showChevron: false, - }, - { - onPressCallback: () => { - this.onContributorListItemPress(this.helpfulUsers.celine); - }, - icon: this.helpfulUsers.celine.icon, - text: this.helpfulUsers.celine.name, - showChevron: false, - }, - { - onPressCallback: () => { - this.onContributorListItemPress(this.helpfulUsers.damien); - }, - icon: this.helpfulUsers.damien.icon, - text: this.helpfulUsers.damien.name, - showChevron: false, - }, - { - onPressCallback: () => { - this.onContributorListItemPress(this.helpfulUsers.titouan); - }, - icon: this.helpfulUsers.titouan.icon, - text: this.helpfulUsers.titouan.name, - showChevron: false, - }, - { - onPressCallback: () => { - this.onContributorListItemPress(this.helpfulUsers.theo); - }, - icon: this.helpfulUsers.theo.icon, - text: this.helpfulUsers.theo.name, - showChevron: false, - }, - ]; + thanksData: Array; /** * Data to be displayed in the technologies card @@ -319,6 +263,34 @@ class AboutScreen extends React.Component { dialogMessage: '', dialogButtons: [], }; + this.teamData = [ + ...this.getMemberData(this.majorContributors), + { + onPressCallback: () => { + const {navigation} = this.props; + navigation.navigate('feedback'); + }, + icon: 'hand-pointing-right', + text: i18n.t('screens.about.user.you'), + showChevron: true, + }, + ]; + this.thanksData = this.getMemberData(this.helpfulUsers); + } + + getMemberData(data: Array): Array { + const final: Array = []; + data.forEach((item) => { + final.push({ + onPressCallback: () => { + this.onContributorListItemPress(item); + }, + icon: item.icon, + text: item.name, + showChevron: false, + }); + }); + return final; } /** @@ -355,7 +327,7 @@ class AboutScreen extends React.Component { } if (trollLink) { dialogBtn.push({ - title: 'SWAG', + title: 'Coucou', onPress: () => { openWebLink(trollLink); },