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 {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 type {CustomTheme} from "../../managers/ThemeManager";
|
||||
import i18n from 'i18n-js';
|
||||
|
@ -25,6 +25,7 @@ class ActionsDashBoardItem extends React.Component<Props> {
|
|||
render() {
|
||||
const isLoggedIn = this.props.isLoggedIn;
|
||||
return (
|
||||
<View>
|
||||
<Card style={{
|
||||
...styles.card,
|
||||
borderColor: this.props.theme.colors.primary,
|
||||
|
@ -50,6 +51,16 @@ class ActionsDashBoardItem extends React.Component<Props> {
|
|||
style={styles.list}
|
||||
/>
|
||||
</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({
|
||||
card: {
|
||||
width: 'auto',
|
||||
marginLeft: 10,
|
||||
marginRight: 10,
|
||||
marginTop: 10,
|
||||
margin: 10,
|
||||
borderWidth: 1,
|
||||
},
|
||||
avatar: {
|
||||
|
|
|
@ -69,7 +69,7 @@ class AboutScreen extends React.Component<Props, State> {
|
|||
{
|
||||
onPressCallback: () => this.props.navigation.navigate("feedback"),
|
||||
icon: 'bug',
|
||||
text: i18n.t('screens.feedback'),
|
||||
text: i18n.t("feedbackScreen.homeButtonTitle"),
|
||||
showChevron: true
|
||||
},
|
||||
{
|
||||
|
|
|
@ -31,12 +31,16 @@ class FeedbackScreen extends React.Component<Props> {
|
|||
|
||||
getButtons(isBug: boolean) {
|
||||
return (
|
||||
<Card.Actions>
|
||||
<Card.Actions style={{
|
||||
flex: 1,
|
||||
flexWrap: 'wrap',
|
||||
}}>
|
||||
<Button
|
||||
icon="email"
|
||||
mode="contained"
|
||||
style={{
|
||||
marginLeft: 'auto',
|
||||
marginTop: 5,
|
||||
}}
|
||||
onPress={() => Linking.openURL(isBug ? links.bugsMail : links.feedbackMail)}>
|
||||
MAIL
|
||||
|
@ -45,16 +49,18 @@ class FeedbackScreen extends React.Component<Props> {
|
|||
icon="git"
|
||||
mode="contained"
|
||||
style={{
|
||||
marginLeft: 10,
|
||||
marginLeft: 'auto',
|
||||
marginTop: 5,
|
||||
}}
|
||||
onPress={() => Linking.openURL(isBug ? links.bugsGit : links.feedbackGit)}>
|
||||
GIT
|
||||
GITEA
|
||||
</Button>
|
||||
<Button
|
||||
icon="facebook"
|
||||
mode="contained"
|
||||
style={{
|
||||
marginLeft: 10,
|
||||
marginLeft: 'auto',
|
||||
marginTop: 5,
|
||||
}}
|
||||
onPress={() => Linking.openURL(links.facebook)}>
|
||||
Facebook
|
||||
|
|
|
@ -394,6 +394,8 @@
|
|||
"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."
|
||||
"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",
|
||||
"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."
|
||||
|
||||
"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