diff --git a/src/navigation/MainNavigator.js b/src/navigation/MainNavigator.js
index f3f08d5..79aca49 100644
--- a/src/navigation/MainNavigator.js
+++ b/src/navigation/MainNavigator.js
@@ -29,6 +29,7 @@ import ClubListScreen from "../screens/Amicale/Clubs/ClubListScreen";
import ClubAboutScreen from "../screens/Amicale/Clubs/ClubAboutScreen";
import ClubDisplayScreen from "../screens/Amicale/Clubs/ClubDisplayScreen";
import {createScreenCollapsibleStack, getWebsiteStack} from "../utils/CollapsibleUtils";
+import BugReportScreen from "../screens/Other/FeedbackScreen";
const modalTransition = Platform.OS === 'ios' ? TransitionPresets.ModalPresentationIOS : TransitionPresets.ModalSlideFromBottomIOS;
@@ -158,6 +159,14 @@ function MainStackComponent(props: { createTabNavigator: () => React.Node }) {
title: i18n.t('screens.vote'),
}}
/>
+
+
);
}
diff --git a/src/screens/About/AboutScreen.js b/src/screens/About/AboutScreen.js
index ba58e51..ada3967 100644
--- a/src/screens/About/AboutScreen.js
+++ b/src/screens/About/AboutScreen.js
@@ -5,23 +5,12 @@ import {FlatList, Linking, Platform, View} from 'react-native';
import i18n from "i18n-js";
import appJson from '../../../app';
import AsyncStorageManager from "../../managers/AsyncStorageManager";
-import CustomModal from "../../components/Overrides/CustomModal";
-import {Avatar, Button, Card, List, Text, Title, withTheme} from 'react-native-paper';
+import {Avatar, Card, List, Title, withTheme} from 'react-native-paper';
const links = {
appstore: 'https://apps.apple.com/us/app/campus-amicale-insat/id1477722148',
playstore: 'https://play.google.com/store/apps/details?id=fr.amicaleinsat.application',
git: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/src/branch/master/README.md',
- bugsMail: 'mailto:vergnet@etud.insa-toulouse.fr?' +
- 'subject=' +
- '[BUG] Application Amicale INSA Toulouse' +
- '&body=' +
- 'Coucou Arnaud ça bug c\'est nul,\n\n' +
- 'Informations sur ton système si tu sais (iOS ou Android, modèle du tel, version):\n\n\n' +
- 'Nature du problème :\n\n\n' +
- 'Étapes pour reproduire ce pb :\n\n\n\n' +
- 'Stp corrige le pb, bien cordialement.',
- bugsGit: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/issues',
changelog: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/src/branch/master/Changelog.md',
license: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/src/branch/master/LICENSE',
authorMail: "mailto:vergnet@etud.insa-toulouse.fr?" +
@@ -78,9 +67,9 @@ class AboutScreen extends React.Component {
showChevron: true
},
{
- onPressCallback: () => this.openBugReportModal(),
+ onPressCallback: () => this.props.navigation.navigate("feedback"),
icon: 'bug',
- text: i18n.t('aboutScreen.bugs'),
+ text: i18n.t('screens.feedback'),
showChevron: true
},
{
@@ -193,21 +182,11 @@ class AboutScreen extends React.Component {
},
];
- getCardItem: Function;
- getMainCard: Function;
- onModalRef: Function;
- onPressMail: Function;
- onPressGit: Function;
colors: Object;
constructor(props) {
super(props);
- this.getCardItem = this.getCardItem.bind(this);
- this.getMainCard = this.getMainCard.bind(this);
- this.onModalRef = this.onModalRef.bind(this);
- this.onPressMail = openWebLink.bind(this, links.bugsMail);
- this.onPressGit = openWebLink.bind(this, links.bugsGit);
this.colors = props.theme.colors;
}
@@ -340,7 +319,7 @@ class AboutScreen extends React.Component {
*
* @returns {*}
*/
- getCardItem({item}: Object) {
+ getCardItem = ({item}: Object) => {
let shouldShow = item === undefined
|| !item.showOnlyInDebug
|| (item.showOnlyInDebug && this.state.isDebugUnlocked);
@@ -366,7 +345,7 @@ class AboutScreen extends React.Component {
}
} else
return null;
- }
+ };
/**
* Tries to unlock debug mode
@@ -387,63 +366,13 @@ class AboutScreen extends React.Component {
AsyncStorageManager.getInstance().savePref(key, '1');
}
- /**
- * Gets the bug report modal's content
- *
- * @return {*}
- */
- getBugReportModal() {
- return (
-
- {i18n.t('aboutScreen.bugs')}
-
- {i18n.t('aboutScreen.bugsDescription')}
-
-
-
-
- );
- }
-
- /**
- * opens the bug report modal
- */
- openBugReportModal() {
- if (this.modalRef) {
- this.modalRef.open();
- }
- }
-
/**
* Gets a card, depending on the given item's id
*
* @param item The item to show
* @return {*}
*/
- getMainCard({item}: Object) {
+ getMainCard = ({item}: Object) => {
switch (item.id) {
case 'app':
return this.getAppCard();
@@ -453,29 +382,15 @@ class AboutScreen extends React.Component {
return this.getTechnoCard();
}
return ;
- }
-
- /**
- * Callback used when receiving the modal ref
- *
- * @param ref
- */
- onModalRef(ref: Object) {
- this.modalRef = ref;
- }
+ };
render() {
return (
-
-
- {this.getBugReportModal()}
-
-
-
+
);
}
}
diff --git a/src/screens/Other/FeedbackScreen.js b/src/screens/Other/FeedbackScreen.js
new file mode 100644
index 0000000..ab82571
--- /dev/null
+++ b/src/screens/Other/FeedbackScreen.js
@@ -0,0 +1,104 @@
+// @flow
+
+import * as React from 'react';
+import {Avatar, Button, Card, Paragraph, withTheme} from "react-native-paper";
+import i18n from "i18n-js";
+import {ScrollView} from "react-native";
+import {Linking} from "expo";
+import type {CustomTheme} from "../../managers/ThemeManager";
+
+type Props = {
+ theme: CustomTheme
+};
+
+const links = {
+ bugsMail: `mailto:vergnet@etud.insa-toulouse.fr
+?subject=[BUG] Application CAMPUS
+&body=Coucou Arnaud ça bug c'est nul,\n\n
+Informations sur ton système si tu sais (iOS ou Android, modèle du tel, version):\n\n\n
+Nature du problème :\n\n\n
+Étapes pour reproduire ce pb :\n\n\n\n
+Stp corrige le pb, bien cordialement.`,
+ bugsGit: 'https://git.etud.insa-toulouse.fr/vergnet/application-amicale/issues/new',
+ facebook: "https://www.facebook.com/campus.insat",
+ feedbackMail: `mailto:vergnet@etud.insa-toulouse.fr
+?subject=[FEEDBACK] Application CAMPUS
+&body=Coucou Arnaud j'ai du feedback\n\n\n\nBien cordialement.`,
+ feedbackGit: "https://git.etud.insa-toulouse.fr/vergnet/application-amicale/issues/new",
+}
+
+class FeedbackScreen extends React.Component {
+
+ getButtons(isBug: boolean) {
+ return (
+
+
+
+
+
+ );
+ }
+
+ render() {
+ return (
+
+
+ }
+ />
+
+
+ {i18n.t('feedbackScreen.bugsDescription')}
+
+
+ {i18n.t('feedbackScreen.contactMeans')}
+
+
+ {this.getButtons(true)}
+
+
+
+ }
+ />
+
+
+ {i18n.t('feedbackScreen.feedbackDescription')}
+
+
+ {this.getButtons(false)}
+
+
+ );
+ }
+}
+
+export default withTheme(FeedbackScreen);
\ No newline at end of file
diff --git a/translations/en.json b/translations/en.json
index 6861ea4..3eed4cf 100644
--- a/translations/en.json
+++ b/translations/en.json
@@ -24,7 +24,8 @@
"logout": "Logout",
"profile": "Profile",
"vote": "Elections",
- "scanner": "Scanotron 3000"
+ "scanner": "Scanotron 3000",
+ "feedback": "Feedback"
},
"intro": {
"slide1": {
@@ -99,10 +100,6 @@
"aboutScreen": {
"appstore": "See on the Appstore",
"playstore": "See on the Playstore",
- "bugs": "Report Bugs",
- "bugsDescription": "Reporting bugs helps us make the app better. Please be as precise as possible when describing your problem!",
- "bugsMail": "Send a Mail",
- "bugsGit": "Open an issue on Git",
"changelog": "Changelog",
"license": "License",
"debug": "Debug",
@@ -389,5 +386,14 @@
},
"planningScreen": {
"invalidEvent": "Could not find the event. Please make sure the event you are trying to access is valid."
+ },
+ "feedbackScreen": {
+ "bugs": "Report Bugs",
+ "bugsSubtitle": "Did you find a bug? Let us know!",
+ "bugsDescription": "Reporting bugs helps us make the app better. To do so, use one of the buttons below and be as precise as possible when describing your problem!",
+ "feedback": "Feedback",
+ "feedbackSubtitle": "Let us know what you think!",
+ "feedbackDescription": "Do you have a feature you want to be added/changed/removed, want to give your opinion on the app or simply chat with the dev? Use one of the links below!",
+ "contactMeans": "Using Git is recommended, to use it simply login with your INSA account."
}
}
diff --git a/translations/fr.json b/translations/fr.json
index 87548c4..24c208e 100644
--- a/translations/fr.json
+++ b/translations/fr.json
@@ -24,7 +24,8 @@
"logout": "Se Déconnecter",
"profile": "Profil",
"vote": "Élections",
- "scanner": "Scanotron 3000"
+ "scanner": "Scanotron 3000",
+ "feedback": "Votre avis"
},
"intro": {
"slide1": {
@@ -99,10 +100,6 @@
"aboutScreen": {
"appstore": "Voir sur l'Appstore",
"playstore": "Voir sur le Playstore",
- "bugs": "Rapporter des Bugs",
- "bugsDescription": "Rapporter les bugs nous aide à améliorer l'appli. Merci de décrire votre problème le plus précisément possible !",
- "bugsMail": "Envoyer un Mail",
- "bugsGit": "Ouvrir un ticket sur Git",
"changelog": "Historique des modifications",
"license": "Licence",
"debug": "Debug",
@@ -389,5 +386,15 @@
},
"planningScreen": {
"invalidEvent": "Impossible de trouver l'événement. Merci de vérifier que l'événement que vous voulez voir est valide."
+ },
+ "feedbackScreen": {
+ "bugs": "Rapporter des Bugs",
+ "bugsSubtitle": "Vous avez trouvé un bug ?",
+ "bugsDescription": "Rapporter les bugs nous aide à améliorer l'appli. Pour cela, merci d'utiliser un des boutons ci-dessous et de décrire votre problème le plus précisément possible !",
+ "feedback": "Feedback",
+ "feedbackSubtitle": "Did nous ce que vous pensez!",
+ "feedbackDescription": "Vous voulez voir une fonctionnalité ajoutée/modifiée/supprimée ?, vous voulez donner votre opinion sur l'appli ou simplement discuter avec les devs ? Utilisez un des liens ci-dessous !",
+ "contactMeans": "L'utilisation de Git est recommandée, pour l'utiliser, connectez vous avec vos identifiants INSA."
+
}
}