Browse Source

Add new contributor and improve contributors generation

Arnaud Vergnet 3 years ago
parent
commit
f1318c6aed
3 changed files with 69 additions and 95 deletions
  1. 8
    7
      locales/en.json
  2. 8
    7
      locales/fr.json
  3. 53
    81
      src/screens/About/AboutScreen.tsx

+ 8
- 7
locales/en.json View File

@@ -364,13 +364,14 @@
364 364
       "thanks": "Thanks",
365 365
       "user": {
366 366
         "you": "You ?",
367
-        "arnaud": "Student in IR (2020). He is the creator of this beautiful app you use everyday. Some say he is handsome as well.",
368
-        "yohan":  "Student in IR (2020). He helped to fix bugs. I think he is handsome as well but I don't know him personally.",
369
-        "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.",
370
-        "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 🦊.",
371
-        "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.",
372
-        "titouan": "Student in IR (2020). He helped a lot in finding bugs and new features.",
373
-        "theo": "Student in AE (2020). If the app works on iOS, this is all thanks to his help during his numerous tests."
367
+        "arnaud": "Student in 4IR (2020). He is the creator of this app you use everyday.",
368
+        "docjyj":  "Student in 2MIC FAS (2020). He added some new features and fixed some bugs.",
369
+        "yohan":  "Student in 4IR (2020). He helped to fix bugs and gave some ideas.",
370
+        "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.",
371
+        "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 🦊.",
372
+        "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.",
373
+        "titouan": "Student in 4IR (2020). He helped a lot in finding bugs and new features.",
374
+        "theo": "Student in 4AE (2020). If the app works on iOS, this is all thanks to his help during his numerous tests."
374 375
       }
375 376
     },
376 377
     "feedback": {

+ 8
- 7
locales/fr.json View File

@@ -364,13 +364,14 @@
364 364
       "thanks": "Remerciements",
365 365
       "user": {
366 366
         "you": "Toi ?",
367
-        "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.",
368
-        "yohan":  "Étudiant en IR (2020). Il a aidé à corriger des bug. Et j'imagine aussi qu'il est BG mais je le connait pas.",
369
-        "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.",
370
-        "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 🦊.",
371
-        "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.",
372
-        "titouan": "Étudiant en IR (2020). Il a beaucoup aidé pour trouver des bugs et proposer des nouvelles fonctionnalités.",
373
-        "theo": "Étudiant en AE (2020). Si l’application marche sur iOS, c’est grâce à son aide lors de ses nombreux tests."
367
+        "arnaud": "Étudiant en 4IR (2020). C'est le créateur de cette application que t' utilises tous les jours.",
368
+        "docjyj":  "Étudiant en 2MIC FAS (2020). Il a ajouté quelques nouvelles fonctionnalités et corrigé des bugs.",
369
+        "yohan":  "Étudiant en 4IR (2020). Il a aidé à corriger des bug et a proposé quelques idées.",
370
+        "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.",
371
+        "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 🦊.",
372
+        "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.",
373
+        "titouan": "Étudiant en 4IR (2020). Il a beaucoup aidé pour trouver des bugs et proposer des nouvelles fonctionnalités.",
374
+        "theo": "Étudiant en 4AE (2020). Si l’application marche sur iOS, c’est grâce à son aide lors de ses nombreux tests."
374 375
       }
375 376
     },
376 377
     "feedback": {

+ 53
- 81
src/screens/About/AboutScreen.tsx View File

@@ -84,8 +84,8 @@ class AboutScreen extends React.Component<PropsType, StateType> {
84 84
   /**
85 85
    * Object containing data relative to major contributors
86 86
    */
87
-  majorContributors: {[key: string]: MemberItemType} = {
88
-    arnaud: {
87
+  majorContributors: Array<MemberItemType> = [
88
+    {
89 89
       name: 'Arnaud Vergnet',
90 90
       message: i18n.t('screens.about.user.arnaud'),
91 91
       icon: 'crown',
@@ -98,7 +98,18 @@ class AboutScreen extends React.Component<PropsType, StateType> {
98 98
         '&body=' +
99 99
         'Coucou !\n\n',
100 100
     },
101
-    yohan: {
101
+    {
102
+      name: 'Jean-Yves Saint-Loubert',
103
+      message: i18n.t('screens.about.user.docjyj'),
104
+      icon: 'xml',
105
+      mail:
106
+        'mailto:saint-lo@etud.insa-toulouse.fr?' +
107
+        'subject=' +
108
+        'Application Amicale INSA Toulouse' +
109
+        '&body=' +
110
+        'Coucou !\n\n',
111
+    },
112
+    {
102 113
       name: 'Yohan Simard',
103 114
       message: i18n.t('screens.about.user.yohan'),
104 115
       icon: 'xml',
@@ -110,38 +121,38 @@ class AboutScreen extends React.Component<PropsType, StateType> {
110 121
         '&body=' +
111 122
         'Coucou !\n\n',
112 123
     },
113
-  };
124
+  ];
114 125
 
115 126
   /**
116 127
    * Object containing data relative to users who helped during development
117 128
    */
118
-  helpfulUsers: {[key: string]: MemberItemType} = {
119
-    beranger: {
129
+  helpfulUsers: Array<MemberItemType> = [
130
+    {
120 131
       name: 'Béranger Quintana Y Arciosana',
121 132
       message: i18n.t('screens.about.user.beranger'),
122 133
       icon: 'account-heart',
123 134
     },
124
-    celine: {
135
+    {
125 136
       name: 'Céline Tassin',
126 137
       message: i18n.t('screens.about.user.celine'),
127 138
       icon: 'brush',
128 139
     },
129
-    damien: {
140
+    {
130 141
       name: 'Damien Molina',
131 142
       message: i18n.t('screens.about.user.damien'),
132 143
       icon: 'web',
133 144
     },
134
-    titouan: {
145
+    {
135 146
       name: 'Titouan Labourdette',
136 147
       message: i18n.t('screens.about.user.titouan'),
137 148
       icon: 'shield-bug',
138 149
     },
139
-    theo: {
150
+    {
140 151
       name: 'Théo Tami',
141 152
       message: i18n.t('screens.about.user.theo'),
142 153
       icon: 'food-apple',
143 154
     },
144
-  };
155
+  ];
145 156
 
146 157
   /**
147 158
    * Data to be displayed in the app card
@@ -196,79 +207,12 @@ class AboutScreen extends React.Component<PropsType, StateType> {
196 207
   /**
197 208
    * Data to be displayed in the team card
198 209
    */
199
-  teamData: Array<ListItemType> = [
200
-    {
201
-      onPressCallback: () => {
202
-        this.onContributorListItemPress(this.majorContributors.arnaud);
203
-      },
204
-      icon: this.majorContributors.arnaud.icon,
205
-      text: this.majorContributors.arnaud.name,
206
-      showChevron: false,
207
-    },
208
-    {
209
-      onPressCallback: () => {
210
-        this.onContributorListItemPress(this.majorContributors.yohan);
211
-      },
212
-      icon: this.majorContributors.yohan.icon,
213
-      text: this.majorContributors.yohan.name,
214
-      showChevron: false,
215
-    },
216
-    {
217
-      onPressCallback: () => {
218
-        const {navigation} = this.props;
219
-        navigation.navigate('feedback');
220
-      },
221
-      icon: 'hand-pointing-right',
222
-      text: i18n.t('screens.about.user.you'),
223
-      showChevron: true,
224
-    },
225
-  ];
210
+  teamData: Array<ListItemType>;
226 211
 
227 212
   /**
228 213
    * Data to be displayed in the thanks card
229 214
    */
230
-  thanksData: Array<ListItemType> = [
231
-    {
232
-      onPressCallback: () => {
233
-        this.onContributorListItemPress(this.helpfulUsers.beranger);
234
-      },
235
-      icon: this.helpfulUsers.beranger.icon,
236
-      text: this.helpfulUsers.beranger.name,
237
-      showChevron: false,
238
-    },
239
-    {
240
-      onPressCallback: () => {
241
-        this.onContributorListItemPress(this.helpfulUsers.celine);
242
-      },
243
-      icon: this.helpfulUsers.celine.icon,
244
-      text: this.helpfulUsers.celine.name,
245
-      showChevron: false,
246
-    },
247
-    {
248
-      onPressCallback: () => {
249
-        this.onContributorListItemPress(this.helpfulUsers.damien);
250
-      },
251
-      icon: this.helpfulUsers.damien.icon,
252
-      text: this.helpfulUsers.damien.name,
253
-      showChevron: false,
254
-    },
255
-    {
256
-      onPressCallback: () => {
257
-        this.onContributorListItemPress(this.helpfulUsers.titouan);
258
-      },
259
-      icon: this.helpfulUsers.titouan.icon,
260
-      text: this.helpfulUsers.titouan.name,
261
-      showChevron: false,
262
-    },
263
-    {
264
-      onPressCallback: () => {
265
-        this.onContributorListItemPress(this.helpfulUsers.theo);
266
-      },
267
-      icon: this.helpfulUsers.theo.icon,
268
-      text: this.helpfulUsers.theo.name,
269
-      showChevron: false,
270
-    },
271
-  ];
215
+  thanksData: Array<ListItemType>;
272 216
 
273 217
   /**
274 218
    * Data to be displayed in the technologies card
@@ -319,6 +263,34 @@ class AboutScreen extends React.Component<PropsType, StateType> {
319 263
       dialogMessage: '',
320 264
       dialogButtons: [],
321 265
     };
266
+    this.teamData = [
267
+      ...this.getMemberData(this.majorContributors),
268
+      {
269
+        onPressCallback: () => {
270
+          const {navigation} = this.props;
271
+          navigation.navigate('feedback');
272
+        },
273
+        icon: 'hand-pointing-right',
274
+        text: i18n.t('screens.about.user.you'),
275
+        showChevron: true,
276
+      },
277
+    ];
278
+    this.thanksData = this.getMemberData(this.helpfulUsers);
279
+  }
280
+
281
+  getMemberData(data: Array<MemberItemType>): Array<ListItemType> {
282
+    const final: Array<ListItemType> = [];
283
+    data.forEach((item) => {
284
+      final.push({
285
+        onPressCallback: () => {
286
+          this.onContributorListItemPress(item);
287
+        },
288
+        icon: item.icon,
289
+        text: item.name,
290
+        showChevron: false,
291
+      });
292
+    });
293
+    return final;
322 294
   }
323 295
 
324 296
   /**
@@ -355,7 +327,7 @@ class AboutScreen extends React.Component<PropsType, StateType> {
355 327
     }
356 328
     if (trollLink) {
357 329
       dialogBtn.push({
358
-        title: 'SWAG',
330
+        title: 'Coucou',
359 331
         onPress: () => {
360 332
           openWebLink(trollLink);
361 333
         },

Loading…
Cancel
Save