forked from vergnet/application-amicale
Added bug report button on home screen
This commit is contained in:
parent
9e251ad150
commit
8c9e068faa
5 changed files with 53 additions and 35 deletions
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import {Avatar, Card, List, withTheme} from 'react-native-paper';
|
import {Avatar, Card, List, withTheme} from 'react-native-paper';
|
||||||
import {StyleSheet} from "react-native";
|
import {StyleSheet, View} from "react-native";
|
||||||
import {DrawerNavigationProp} from "@react-navigation/drawer";
|
import {DrawerNavigationProp} from "@react-navigation/drawer";
|
||||||
import type {CustomTheme} from "../../managers/ThemeManager";
|
import type {CustomTheme} from "../../managers/ThemeManager";
|
||||||
import i18n from 'i18n-js';
|
import i18n from 'i18n-js';
|
||||||
|
@ -25,6 +25,7 @@ class ActionsDashBoardItem extends React.Component<Props> {
|
||||||
render() {
|
render() {
|
||||||
const isLoggedIn = this.props.isLoggedIn;
|
const isLoggedIn = this.props.isLoggedIn;
|
||||||
return (
|
return (
|
||||||
|
<View>
|
||||||
<Card style={{
|
<Card style={{
|
||||||
...styles.card,
|
...styles.card,
|
||||||
borderColor: this.props.theme.colors.primary,
|
borderColor: this.props.theme.colors.primary,
|
||||||
|
@ -50,6 +51,16 @@ class ActionsDashBoardItem extends React.Component<Props> {
|
||||||
style={styles.list}
|
style={styles.list}
|
||||||
/>
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
|
<List.Item
|
||||||
|
title={i18n.t("feedbackScreen.homeButtonTitle")}
|
||||||
|
description={i18n.t("feedbackScreen.homeButtonSubtitle")}
|
||||||
|
left={props => <List.Icon {...props} icon={"bug"}/>}
|
||||||
|
right={props => <List.Icon {...props} icon={"chevron-right"}/>}
|
||||||
|
onPress={() => this.props.navigation.navigate("feedback")}
|
||||||
|
style={{...styles.list, marginLeft: 10, marginRight: 10}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -57,9 +68,7 @@ class ActionsDashBoardItem extends React.Component<Props> {
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
card: {
|
card: {
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
marginLeft: 10,
|
margin: 10,
|
||||||
marginRight: 10,
|
|
||||||
marginTop: 10,
|
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
},
|
},
|
||||||
avatar: {
|
avatar: {
|
||||||
|
|
|
@ -69,7 +69,7 @@ class AboutScreen extends React.Component<Props, State> {
|
||||||
{
|
{
|
||||||
onPressCallback: () => this.props.navigation.navigate("feedback"),
|
onPressCallback: () => this.props.navigation.navigate("feedback"),
|
||||||
icon: 'bug',
|
icon: 'bug',
|
||||||
text: i18n.t('screens.feedback'),
|
text: i18n.t("feedbackScreen.homeButtonTitle"),
|
||||||
showChevron: true
|
showChevron: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -31,12 +31,16 @@ class FeedbackScreen extends React.Component<Props> {
|
||||||
|
|
||||||
getButtons(isBug: boolean) {
|
getButtons(isBug: boolean) {
|
||||||
return (
|
return (
|
||||||
<Card.Actions>
|
<Card.Actions style={{
|
||||||
|
flex: 1,
|
||||||
|
flexWrap: 'wrap',
|
||||||
|
}}>
|
||||||
<Button
|
<Button
|
||||||
icon="email"
|
icon="email"
|
||||||
mode="contained"
|
mode="contained"
|
||||||
style={{
|
style={{
|
||||||
marginLeft: 'auto',
|
marginLeft: 'auto',
|
||||||
|
marginTop: 5,
|
||||||
}}
|
}}
|
||||||
onPress={() => Linking.openURL(isBug ? links.bugsMail : links.feedbackMail)}>
|
onPress={() => Linking.openURL(isBug ? links.bugsMail : links.feedbackMail)}>
|
||||||
MAIL
|
MAIL
|
||||||
|
@ -45,16 +49,18 @@ class FeedbackScreen extends React.Component<Props> {
|
||||||
icon="git"
|
icon="git"
|
||||||
mode="contained"
|
mode="contained"
|
||||||
style={{
|
style={{
|
||||||
marginLeft: 10,
|
marginLeft: 'auto',
|
||||||
|
marginTop: 5,
|
||||||
}}
|
}}
|
||||||
onPress={() => Linking.openURL(isBug ? links.bugsGit : links.feedbackGit)}>
|
onPress={() => Linking.openURL(isBug ? links.bugsGit : links.feedbackGit)}>
|
||||||
GIT
|
GITEA
|
||||||
</Button>
|
</Button>
|
||||||
<Button
|
<Button
|
||||||
icon="facebook"
|
icon="facebook"
|
||||||
mode="contained"
|
mode="contained"
|
||||||
style={{
|
style={{
|
||||||
marginLeft: 10,
|
marginLeft: 'auto',
|
||||||
|
marginTop: 5,
|
||||||
}}
|
}}
|
||||||
onPress={() => Linking.openURL(links.facebook)}>
|
onPress={() => Linking.openURL(links.facebook)}>
|
||||||
Facebook
|
Facebook
|
||||||
|
|
|
@ -394,6 +394,8 @@
|
||||||
"feedback": "Feedback",
|
"feedback": "Feedback",
|
||||||
"feedbackSubtitle": "Let us know what you think!",
|
"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!",
|
"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."
|
"contactMeans": "Using Gitea is recommended, to use it simply login with your INSA account.",
|
||||||
|
"homeButtonTitle": "Feedback/Bug report",
|
||||||
|
"homeButtonSubtitle": "Contact the devs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -394,7 +394,8 @@
|
||||||
"feedback": "Feedback",
|
"feedback": "Feedback",
|
||||||
"feedbackSubtitle": "Did nous ce que vous pensez!",
|
"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 !",
|
"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."
|
"contactMeans": "L'utilisation de Gitea est recommandée, pour l'utiliser, connectez vous avec vos identifiants INSA.",
|
||||||
|
"homeButtonTitle": "Feedback/Bugs",
|
||||||
|
"homeButtonSubtitle": "Contacter les devs"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue