Browse Source

Update About Screen

docjyJ 3 years ago
parent
commit
c6bb1ccc86
3 changed files with 70 additions and 99 deletions
  1. 0
    2
      locales/en.json
  2. 0
    2
      locales/fr.json
  3. 70
    95
      src/screens/About/AboutScreen.js

+ 0
- 2
locales/en.json View File

@@ -346,9 +346,7 @@
346 346
       "license": "License",
347 347
       "debug": "Debug",
348 348
       "team": "Team",
349
-      "author": "Author and maintainer",
350 349
       "authorMail": "Send an email",
351
-      "additionalDev": "Developer",
352 350
       "technologies": "Technologies",
353 351
       "reactNative": "Made with React Native",
354 352
       "libs": "Libraries used",

+ 0
- 2
locales/fr.json View File

@@ -345,9 +345,7 @@
345 345
       "license": "Licence",
346 346
       "debug": "Debug",
347 347
       "team": "Équipe",
348
-      "author": "Auteur et mainteneur",
349 348
       "authorMail": "Envoyer un mail",
350
-      "additionalDev": "Dévelopeur",
351 349
       "technologies": "Technologies",
352 350
       "reactNative": "Créé avec React Native",
353 351
       "libs": "Librairies utilisées",

+ 70
- 95
src/screens/About/AboutScreen.js View File

@@ -5,7 +5,7 @@ import {FlatList, Linking, Platform, Image, View} from 'react-native';
5 5
 import i18n from 'i18n-js';
6 6
 import {Avatar, Card, List, withTheme} from 'react-native-paper';
7 7
 import {StackNavigationProp} from '@react-navigation/stack';
8
-import {Modalize} from 'react-native-modalize';
8
+import {Modalize} from "react-native-modalize";
9 9
 import packageJson from '../../../package.json';
10 10
 import CollapsibleFlatList from '../../components/Collapsible/CollapsibleFlatList';
11 11
 import APP_LOGO from '../../../assets/android.icon.round.png';
@@ -13,7 +13,8 @@ import type {
13 13
   CardTitleIconPropsType,
14 14
   ListIconPropsType,
15 15
 } from '../../constants/PaperStyles';
16
-import OptionsDialog from '../../components/Dialogs/OptionsDialog';
16
+import OptionsDialog from "../../components/Dialogs/OptionsDialog";
17
+import type {OptionsDialogButtonType} from "../../components/Dialogs/OptionsDialog";
17 18
 
18 19
 type ListItemType = {
19 20
   onPressCallback: () => void,
@@ -81,25 +82,23 @@ class AboutScreen extends React.Component<PropsType> {
81 82
    */
82 83
   teamUsers = {
83 84
     arnaud: {
84
-      name: 'Arnaud Vergnrt',
85
-      message: i18n.t('screens.about.user.arnaud'),
86
-      icon: 'crown',
85
+      name: 'Arnaud VERGNET',
86
+      message: 'C vrément tro 1 bg !!',
87
+      icon: 'account-circle',
87 88
       btnTrool: {
88
-        title: 'SWAG',
89
-        onPress: () => {
90
-          openWebLink(links.meme);
89
+          title: 'SWAG',
90
+          onPress: () => {
91
+            openWebLink(links.meme);
92
+          },
91 93
         },
92
-      },
93 94
       btnLinkedin: {
94
-        title: '',
95
-        icon: 'linkedin',
95
+        title: 'Linkedin',
96 96
         onPress: () => {
97 97
           openWebLink(links.arnaudMail);
98 98
         },
99 99
       },
100 100
       btnMail: {
101
-        title: '',
102
-        icon: 'email-edit',
101
+        title: i18n.t('screens.about.authorMail'),
103 102
         onPress: () => {
104 103
           openWebLink(links.arnaudLinkedin);
105 104
         },
@@ -107,38 +106,22 @@ class AboutScreen extends React.Component<PropsType> {
107 106
     },
108 107
     yohan: {
109 108
       name: 'Yohan Simard',
110
-      message: i18n.t('screens.about.user.yohan'),
111
-      icon: 'xml',
109
+      message: 'Correction de quelques bugs',
110
+      icon: 'account-circle',
112 111
       btnTrool: null,
113 112
       btnLinkedin: {
114
-        title: '',
115
-        icon: 'linkedin',
113
+        title: 'Linkedin',
116 114
         onPress: () => {
117 115
           openWebLink(links.yohanLinkedin);
118 116
         },
119 117
       },
120 118
       btnMail: {
121
-        title: '',
122
-        icon: 'email-edit',
119
+        title: i18n.t('screens.about.authorMail'),
123 120
         onPress: () => {
124 121
           openWebLink(links.yohanMail);
125 122
         },
126 123
       },
127 124
     },
128
-    you: {
129
-      name: i18n.t('screens.about.user.youName'),
130
-      message: i18n.t('screens.about.user.you'),
131
-      icon: 'hand-pointing-right',
132
-      btnTrool: {
133
-        title: '',
134
-        icon: 'git',
135
-        onPress: () => {
136
-          openWebLink(links.git);
137
-        },
138
-      },
139
-      btnLinkedin: null,
140
-      btnMail: null,
141
-    },
142 125
   };
143 126
 
144 127
   /**
@@ -147,40 +130,40 @@ class AboutScreen extends React.Component<PropsType> {
147 130
   thanksUsers = {
148 131
     beranger: {
149 132
       name: 'Béranger Quintana Y Arciosana',
150
-      message: i18n.t('screens.about.user.beranger'),
151
-      icon: 'account-heart',
133
+      message: 'É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.',
134
+      icon: 'account-circle',
152 135
       btnTrool: null,
153 136
       btnLinkedin: null,
154 137
       btnMail: null,
155 138
     },
156 139
     celine: {
157 140
       name: 'Céline Tassin',
158
-      message: i18n.t('screens.about.user.celine'),
159
-      icon: 'brush',
141
+      message: 'É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 🦊.',
142
+      icon: 'account-circle',
160 143
       btnTrool: null,
161 144
       btnLinkedin: null,
162 145
       btnMail: null,
163 146
     },
164 147
     damien: {
165 148
       name: 'Damien Molina',
166
-      message: i18n.t('screens.about.user.damien'),
167
-      icon: 'web',
149
+      message: 'É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.',
150
+      icon: 'account-circle',
168 151
       btnTrool: null,
169 152
       btnLinkedin: null,
170 153
       btnMail: null,
171 154
     },
172 155
     titouan: {
173 156
       name: 'Titouan Labourdette',
174
-      message: i18n.t('screens.about.user.titouan'),
175
-      icon: 'shield-bug',
157
+      message: 'É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.',
158
+      icon: 'account-circle',
176 159
       btnTrool: null,
177 160
       btnLinkedin: null,
178 161
       btnMail: null,
179 162
     },
180 163
     theo: {
181 164
       name: 'Théo Tami',
182
-      message: i18n.t('screens.about.user.theo'),
183
-      icon: 'food-apple',
165
+      message: 'Étudiant en IR (2020). Il a beaucoup aidé pour trouver des bugs et proposer des nouvelles fonctionnalités.',
166
+      icon: 'account-circle',
184 167
       btnTrool: null,
185 168
       btnLinkedin: null,
186 169
       btnMail: null,
@@ -257,14 +240,6 @@ class AboutScreen extends React.Component<PropsType> {
257 240
       text: this.teamUsers.yohan.name,
258 241
       showChevron: false,
259 242
     },
260
-    {
261
-      onPressCallback: () => {
262
-        this.onListItemPress(this.teamUsers.you);
263
-      },
264
-      icon: this.teamUsers.you.icon,
265
-      text: this.teamUsers.you.name,
266
-      showChevron: false,
267
-    },
268 243
   ];
269 244
 
270 245
   /**
@@ -371,24 +346,24 @@ class AboutScreen extends React.Component<PropsType> {
371 346
    * Callback used when clicking an article in the list.
372 347
    * It opens the modal to show detailed information about the article
373 348
    *
374
-   * @param user A user key
349
+   * @param user TODO
375 350
    */
376 351
   onListItemPress(user: AthorsItemType) {
377
-    const dialogBtn: Array<IconOptionsDialogButtonType> = [
352
+    const dialogBtn: Array<OptionsDialogButtonType> = [
378 353
       {
379 354
         title: 'OK',
380 355
         onPress: () => {
381
-          this.setState({dialogVisible: false});
356
+          this.onDialogDismiss();
382 357
         },
383
-      },
358
+      }
384 359
     ];
385
-    if (user.btnMail != null) {
360
+    if(user.btnMail != null) {
386 361
       dialogBtn.push(user.btnMail);
387 362
     }
388
-    if (user.btnLinkedin != null) {
363
+    if(user.btnLinkedin != null) {
389 364
       dialogBtn.push(user.btnLinkedin);
390 365
     }
391
-    if (user.btnTrool != null) {
366
+    if(user.btnTrool != null) {
392 367
       dialogBtn.push(user.btnTrool);
393 368
     }
394 369
     this.setState({
@@ -455,27 +430,27 @@ class AboutScreen extends React.Component<PropsType> {
455 430
   }
456 431
 
457 432
   /**
458
-   * Get the thank you card showing support information and links
433
+   * Gets the thanks card showing information and links about the team TODO
459 434
    *
460 435
    * @return {*}
461 436
    */
462 437
   getThanksCard(): React.Node {
463 438
     return (
464
-      <Card style={{marginBottom: 10}}>
465
-        <Card.Title
466
-          title={i18n.t('screens.about.thanks')}
467
-          left={(iconProps: CardTitleIconPropsType): React.Node => (
468
-            <Avatar.Icon size={iconProps.size} icon="hand-heart" />
469
-          )}
470
-        />
471
-        <Card.Content>
472
-          <FlatList
473
-            data={this.thanksData}
474
-            keyExtractor={this.keyExtractor}
475
-            renderItem={this.getCardItem}
439
+        <Card style={{marginBottom: 10}}>
440
+          <Card.Title
441
+              title={i18n.t('screens.about.thanks')}
442
+              left={(iconProps: CardTitleIconPropsType): React.Node => (
443
+                  <Avatar.Icon size={iconProps.size} icon="hand-heart" />
444
+              )}
476 445
           />
477
-        </Card.Content>
478
-      </Card>
446
+          <Card.Content>
447
+            <FlatList
448
+                data={this.thanksData}
449
+                keyExtractor={this.keyExtractor}
450
+                renderItem={this.getCardItem}
451
+            />
452
+          </Card.Content>
453
+        </Card>
479 454
     );
480 455
   }
481 456
 
@@ -486,21 +461,21 @@ class AboutScreen extends React.Component<PropsType> {
486 461
    */
487 462
   getTechnoCard(): React.Node {
488 463
     return (
489
-      <Card style={{marginBottom: 10}}>
490
-        <Card.Title
491
-          title={i18n.t('screens.about.technologies')}
492
-          left={(iconProps: CardTitleIconPropsType): React.Node => (
493
-            <Avatar.Icon size={iconProps.size} icon="wrench" />
494
-          )}
495
-        />
496
-        <Card.Content>
497
-          <FlatList
498
-            data={this.technoData}
499
-            keyExtractor={this.keyExtractor}
500
-            renderItem={this.getCardItem}
464
+        <Card style={{marginBottom: 10}}>
465
+          <Card.Title
466
+              title={i18n.t('screens.about.technologies')}
467
+              left={(iconProps: CardTitleIconPropsType): React.Node => (
468
+                  <Avatar.Icon size={iconProps.size} icon="build" />
469
+              )}
501 470
           />
502
-        </Card.Content>
503
-      </Card>
471
+          <Card.Content>
472
+            <FlatList
473
+                data={this.technoData}
474
+                keyExtractor={this.keyExtractor}
475
+                renderItem={this.getCardItem}
476
+            />
477
+          </Card.Content>
478
+        </Card>
504 479
     );
505 480
   }
506 481
 
@@ -589,20 +564,20 @@ class AboutScreen extends React.Component<PropsType> {
589 564
     const {state} = this;
590 565
     return (
591 566
       <View
592
-        style={{
593
-          height: '100%',
594
-        }}>
567
+          style={{
568
+            height: '100%',
569
+          }}>
595 570
         <CollapsibleFlatList
596 571
           style={{padding: 5}}
597 572
           data={this.dataOrder}
598 573
           renderItem={this.getMainCard}
599 574
         />
600 575
         <OptionsDialog
601
-          visible={state.dialogVisible}
602
-          title={state.dialogTitle}
603
-          message={state.dialogMessage}
604
-          buttons={state.dialogButtons}
605
-          onDismiss={state.onDialogDismiss}
576
+            visible={state.dialogVisible}
577
+            title={state.dialogTitle}
578
+            message={state.dialogMessage}
579
+            buttons={state.dialogButtons}
580
+            onDismiss={state.onDialogDismiss}
606 581
         />
607 582
       </View>
608 583
     );

Loading…
Cancel
Save