|
@@ -185,6 +185,107 @@ export default class AboutScreen extends React.Component<Props, State> {
|
185
|
185
|
},
|
186
|
186
|
];
|
187
|
187
|
|
|
188
|
+ dataOrder: Array<Object> = [
|
|
189
|
+ {
|
|
190
|
+ id: 'app',
|
|
191
|
+ },
|
|
192
|
+ {
|
|
193
|
+ id: 'team',
|
|
194
|
+ },
|
|
195
|
+ {
|
|
196
|
+ id: 'techno',
|
|
197
|
+ },
|
|
198
|
+ ];
|
|
199
|
+
|
|
200
|
+ getAppCard() {
|
|
201
|
+ return (
|
|
202
|
+ <Card>
|
|
203
|
+ <CardItem>
|
|
204
|
+ <Left>
|
|
205
|
+ <Thumbnail square source={require('../../assets/icon.png')}/>
|
|
206
|
+ <Body>
|
|
207
|
+ <H1>{appJson.expo.name}</H1>
|
|
208
|
+ <Text note>
|
|
209
|
+ v.{appJson.expo.version}
|
|
210
|
+ </Text>
|
|
211
|
+ </Body>
|
|
212
|
+ </Left>
|
|
213
|
+ </CardItem>
|
|
214
|
+ <FlatList
|
|
215
|
+ data={this.appData}
|
|
216
|
+ extraData={this.state}
|
|
217
|
+ keyExtractor={(item) => item.icon}
|
|
218
|
+ listKey={(item) => "app"}
|
|
219
|
+ renderItem={({item}) =>
|
|
220
|
+ this.getCardItem(item.onPressCallback, item.icon, item.text, item.showChevron, item.showOnlyDebug)
|
|
221
|
+ }
|
|
222
|
+ />
|
|
223
|
+ </Card>
|
|
224
|
+ );
|
|
225
|
+ }
|
|
226
|
+
|
|
227
|
+ getTeamCard() {
|
|
228
|
+ return (
|
|
229
|
+ <Card>
|
|
230
|
+ <CardItem>
|
|
231
|
+ <Left>
|
|
232
|
+ <CustomMaterialIcon
|
|
233
|
+ icon={'account-multiple'}
|
|
234
|
+ fontSize={40}
|
|
235
|
+ width={40}
|
|
236
|
+ color={ThemeManager.getCurrentThemeVariables().brandPrimary}/>
|
|
237
|
+ <Body>
|
|
238
|
+ <H1>{i18n.t('aboutScreen.team')}</H1>
|
|
239
|
+ </Body>
|
|
240
|
+ </Left>
|
|
241
|
+ </CardItem>
|
|
242
|
+ <CardItem header>
|
|
243
|
+ <Text>{i18n.t('aboutScreen.author')}</Text>
|
|
244
|
+ </CardItem>
|
|
245
|
+ <FlatList
|
|
246
|
+ data={this.authorData}
|
|
247
|
+ extraData={this.state}
|
|
248
|
+ keyExtractor={(item) => item.icon}
|
|
249
|
+ listKey={(item) => "team1"}
|
|
250
|
+ renderItem={({item}) =>
|
|
251
|
+ this.getCardItem(item.onPressCallback, item.icon, item.text, item.showChevron, item.showOnlyDebug)
|
|
252
|
+ }
|
|
253
|
+ />
|
|
254
|
+ <CardItem header>
|
|
255
|
+ <Text>{i18n.t('aboutScreen.additionalDev')}</Text>
|
|
256
|
+ </CardItem>
|
|
257
|
+ <FlatList
|
|
258
|
+ data={this.additionalDevData}
|
|
259
|
+ extraData={this.state}
|
|
260
|
+ keyExtractor={(item) => item.icon}
|
|
261
|
+ listKey={(item) => "team2"}
|
|
262
|
+ renderItem={({item}) =>
|
|
263
|
+ this.getCardItem(item.onPressCallback, item.icon, item.text, item.showChevron, item.showOnlyDebug)
|
|
264
|
+ }
|
|
265
|
+ />
|
|
266
|
+ </Card>
|
|
267
|
+ );
|
|
268
|
+ }
|
|
269
|
+
|
|
270
|
+ getTechnoCard() {
|
|
271
|
+ return (
|
|
272
|
+ <Card>
|
|
273
|
+ <CardItem header>
|
|
274
|
+ <Text>{i18n.t('aboutScreen.technologies')}</Text>
|
|
275
|
+ </CardItem>
|
|
276
|
+ <FlatList
|
|
277
|
+ data={this.technoData}
|
|
278
|
+ extraData={this.state}
|
|
279
|
+ keyExtractor={(item) => item.icon}
|
|
280
|
+ listKey={(item) => "techno"}
|
|
281
|
+ renderItem={({item}) =>
|
|
282
|
+ this.getCardItem(item.onPressCallback, item.icon, item.text, item.showChevron, item.showOnlyDebug)
|
|
283
|
+ }
|
|
284
|
+ />
|
|
285
|
+ </Card>
|
|
286
|
+ );
|
|
287
|
+ }
|
|
288
|
+
|
188
|
289
|
/**
|
189
|
290
|
* Get a clickable card item to be rendered inside a card.
|
190
|
291
|
*
|
|
@@ -284,86 +385,33 @@ export default class AboutScreen extends React.Component<Props, State> {
|
284
|
385
|
}
|
285
|
386
|
}
|
286
|
387
|
|
|
388
|
+ getMainCard(item: Object) {
|
|
389
|
+ switch (item.id) {
|
|
390
|
+ case 'app':
|
|
391
|
+ return this.getAppCard();
|
|
392
|
+ case 'team':
|
|
393
|
+ return this.getTeamCard();
|
|
394
|
+ case 'techno':
|
|
395
|
+ return this.getTechnoCard();
|
|
396
|
+ }
|
|
397
|
+ return <View/>;
|
|
398
|
+ }
|
|
399
|
+
|
287
|
400
|
render() {
|
288
|
401
|
const nav = this.props.navigation;
|
289
|
402
|
return (
|
290
|
403
|
<Container>
|
291
|
404
|
{this.getBugReportModal()}
|
292
|
405
|
<CustomHeader navigation={nav} title={i18n.t('screens.about')} hasBackButton={true}/>
|
293
|
|
- <Content padder>
|
294
|
|
- <Card>
|
295
|
|
- <CardItem>
|
296
|
|
- <Left>
|
297
|
|
- <Thumbnail square source={require('../../assets/icon.png')}/>
|
298
|
|
- <Body>
|
299
|
|
- <H1>{appJson.expo.name}</H1>
|
300
|
|
- <Text note>
|
301
|
|
- v.{appJson.expo.version}
|
302
|
|
- </Text>
|
303
|
|
- </Body>
|
304
|
|
- </Left>
|
305
|
|
- </CardItem>
|
306
|
|
- <FlatList
|
307
|
|
- data={this.appData}
|
308
|
|
- extraData={this.state}
|
309
|
|
- keyExtractor={(item) => item.icon}
|
310
|
|
- renderItem={({item}) =>
|
311
|
|
- this.getCardItem(item.onPressCallback, item.icon, item.text, item.showChevron, item.showOnlyDebug)
|
312
|
|
- }
|
313
|
|
- />
|
314
|
|
- </Card>
|
315
|
|
-
|
316
|
|
- <Card>
|
317
|
|
- <CardItem>
|
318
|
|
- <Left>
|
319
|
|
- <CustomMaterialIcon
|
320
|
|
- icon={'account-multiple'}
|
321
|
|
- fontSize={40}
|
322
|
|
- width={40}
|
323
|
|
- color={ThemeManager.getCurrentThemeVariables().brandPrimary}/>
|
324
|
|
- <Body>
|
325
|
|
- <H1>{i18n.t('aboutScreen.team')}</H1>
|
326
|
|
- </Body>
|
327
|
|
- </Left>
|
328
|
|
- </CardItem>
|
329
|
|
- <CardItem header>
|
330
|
|
- <Text>{i18n.t('aboutScreen.author')}</Text>
|
331
|
|
- </CardItem>
|
332
|
|
- <FlatList
|
333
|
|
- data={this.authorData}
|
334
|
|
- extraData={this.state}
|
335
|
|
- keyExtractor={(item) => item.icon}
|
336
|
|
- renderItem={({item}) =>
|
337
|
|
- this.getCardItem(item.onPressCallback, item.icon, item.text, item.showChevron, item.showOnlyDebug)
|
338
|
|
- }
|
339
|
|
- />
|
340
|
|
- <CardItem header>
|
341
|
|
- <Text>{i18n.t('aboutScreen.additionalDev')}</Text>
|
342
|
|
- </CardItem>
|
343
|
|
- <FlatList
|
344
|
|
- data={this.additionalDevData}
|
345
|
|
- extraData={this.state}
|
346
|
|
- keyExtractor={(item) => item.icon}
|
347
|
|
- renderItem={({item}) =>
|
348
|
|
- this.getCardItem(item.onPressCallback, item.icon, item.text, item.showChevron, item.showOnlyDebug)
|
349
|
|
- }
|
350
|
|
- />
|
351
|
|
- </Card>
|
352
|
|
-
|
353
|
|
- <Card>
|
354
|
|
- <CardItem header>
|
355
|
|
- <Text>{i18n.t('aboutScreen.technologies')}</Text>
|
356
|
|
- </CardItem>
|
357
|
|
- <FlatList
|
358
|
|
- data={this.technoData}
|
359
|
|
- extraData={this.state}
|
360
|
|
- keyExtractor={(item) => item.icon}
|
361
|
|
- renderItem={({item}) =>
|
362
|
|
- this.getCardItem(item.onPressCallback, item.icon, item.text, item.showChevron, item.showOnlyDebug)
|
363
|
|
- }
|
364
|
|
- />
|
365
|
|
- </Card>
|
366
|
|
- </Content>
|
|
406
|
+ <FlatList
|
|
407
|
+ style={{padding: 5}}
|
|
408
|
+ data={this.dataOrder}
|
|
409
|
+ extraData={this.state}
|
|
410
|
+ keyExtractor={(item) => item.id}
|
|
411
|
+ renderItem={({item}) =>
|
|
412
|
+ this.getMainCard(item)
|
|
413
|
+ }
|
|
414
|
+ />
|
367
|
415
|
</Container>
|
368
|
416
|
);
|
369
|
417
|
}
|