Skip to content

Commit 0a75fe1

Browse files
committed
Add info of downloaded CSV location
1 parent f242956 commit 0a75fe1

File tree

2 files changed

+77
-1
lines changed

2 files changed

+77
-1
lines changed

locales/en.json

+2
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,8 @@
10291029
"views.activityExport.toDate": "To Date (End Date)",
10301030
"views.activityExport.dateRange": "Select Date Range:",
10311031
"views.activityExport.downloadCompleteData": "Download Complete Data",
1032+
"views.activityExport.explainerAndroid": "Downloaded CSV files can be found in Files > Downloads.",
1033+
"views.activityExport.explaineriOS": "Downloaded CSV files can be found in the Files app under the ZEUS folder.",
10321034
"views.Routing.RoutingEvent.sourceChannel": "Source Channel",
10331035
"views.Routing.RoutingEvent.destinationChannel": "Destination Channel",
10341036
"views.Olympians.title": "Olympians",

views/ActivityExportOptions.tsx

+75-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@ import {
55
StyleSheet,
66
Alert,
77
ScrollView,
8-
Modal
8+
Modal,
9+
Platform
910
} from 'react-native';
1011
import Icon from 'react-native-vector-icons/Feather';
1112
import { inject, observer } from 'mobx-react';
1213

14+
import Info from '../assets/images/SVG/info.svg';
15+
1316
import Header from '../components/Header';
1417
import Button from '../components/Button';
1518
import TextInput from '../components/TextInput';
@@ -45,6 +48,7 @@ interface ActivityExportOptionsState {
4548
isActivityFetching: boolean;
4649
filteredActivity: any;
4750
isModalVisible: boolean;
51+
showInfoModal: boolean;
4852
customFileName: string;
4953
fromDate: any;
5054
toDate: any;
@@ -65,6 +69,7 @@ export default class ActivityExportOptions extends React.Component<
6569
isActivityFetching: true,
6670
filteredActivity: [],
6771
isModalVisible: false,
72+
showInfoModal: false,
6873
customFileName: '',
6974
fromDate: null,
7075
toDate: null,
@@ -401,6 +406,59 @@ export default class ActivityExportOptions extends React.Component<
401406
);
402407
};
403408

409+
renderInfoModal = () => {
410+
const { showInfoModal } = this.state;
411+
return (
412+
<Modal
413+
animationType="slide"
414+
transparent
415+
visible={showInfoModal}
416+
onRequestClose={() => this.setState({ showInfoModal: false })}
417+
>
418+
<View
419+
style={{
420+
flex: 1,
421+
justifyContent: 'center',
422+
alignItems: 'center'
423+
}}
424+
>
425+
<View
426+
style={{
427+
backgroundColor: themeColor('secondary'),
428+
borderRadius: 24,
429+
padding: 20,
430+
alignItems: 'center'
431+
}}
432+
>
433+
<Text
434+
style={{
435+
fontFamily: 'PPNeueMontreal-Book',
436+
color: themeColor('text'),
437+
fontSize: 20,
438+
marginBottom: 20
439+
}}
440+
>
441+
{Platform.OS === 'android'
442+
? localeString(
443+
'views.activityExport.explainerAndroid'
444+
)
445+
: localeString(
446+
'views.activityExport.explaineriOS'
447+
)}
448+
</Text>
449+
<Button
450+
title={localeString('general.close')}
451+
onPress={() =>
452+
this.setState({ showInfoModal: false })
453+
}
454+
secondary
455+
/>
456+
</View>
457+
</View>
458+
</Modal>
459+
);
460+
};
461+
404462
render() {
405463
const { isActivityFetching } = this.state;
406464

@@ -415,9 +473,25 @@ export default class ActivityExportOptions extends React.Component<
415473
fontFamily: 'PPNeueMontreal-Book'
416474
}
417475
}}
476+
rightComponent={
477+
<TouchableOpacity
478+
style={{ marginRight: 6 }}
479+
onPress={() =>
480+
this.setState({ showInfoModal: true })
481+
}
482+
>
483+
<Info
484+
stroke={themeColor('text')}
485+
fill={themeColor('text')}
486+
width={24}
487+
height={24}
488+
/>
489+
</TouchableOpacity>
490+
}
418491
navigation={this.props.navigation}
419492
/>
420493
{this.renderModal()}
494+
{this.renderInfoModal()}
421495

422496
<View
423497
style={{

0 commit comments

Comments
 (0)