Added bug report button on home screen
這個提交存在於:
父節點
9e251ad150
當前提交
8c9e068faa
共有 5 個檔案被更改,包括 53 行新增 和 35 行删除
|
@ -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,31 +25,42 @@ class ActionsDashBoardItem extends React.Component<Props> {
|
|||
render() {
|
||||
const isLoggedIn = this.props.isLoggedIn;
|
||||
return (
|
||||
<Card style={{
|
||||
...styles.card,
|
||||
borderColor: this.props.theme.colors.primary,
|
||||
}}>
|
||||
<View>
|
||||
<Card style={{
|
||||
...styles.card,
|
||||
borderColor: this.props.theme.colors.primary,
|
||||
}}>
|
||||
<List.Item
|
||||
title={i18n.t("homeScreen.dashboard.amicaleTitle")}
|
||||
description={isLoggedIn
|
||||
? i18n.t("homeScreen.dashboard.amicaleConnected")
|
||||
: i18n.t("homeScreen.dashboard.amicaleConnect")}
|
||||
left={props => <Avatar.Image
|
||||
{...props}
|
||||
size={40}
|
||||
source={ICON_AMICALE}
|
||||
style={styles.avatar}/>}
|
||||
right={props => <List.Icon {...props} icon={isLoggedIn
|
||||
? "chevron-right"
|
||||
: "login"}/>}
|
||||
onPress={isLoggedIn
|
||||
? () => this.props.navigation.navigate("services", {
|
||||
screen: 'index'
|
||||
})
|
||||
: () => this.props.navigation.navigate("login")}
|
||||
style={styles.list}
|
||||
/>
|
||||
</Card>
|
||||
<List.Item
|
||||
title={i18n.t("homeScreen.dashboard.amicaleTitle")}
|
||||
description={isLoggedIn
|
||||
? i18n.t("homeScreen.dashboard.amicaleConnected")
|
||||
: i18n.t("homeScreen.dashboard.amicaleConnect")}
|
||||
left={props => <Avatar.Image
|
||||
{...props}
|
||||
size={40}
|
||||
source={ICON_AMICALE}
|
||||
style={styles.avatar}/>}
|
||||
right={props => <List.Icon {...props} icon={isLoggedIn
|
||||
? "chevron-right"
|
||||
: "login"}/>}
|
||||
onPress={isLoggedIn
|
||||
? () => this.props.navigation.navigate("services", {
|
||||
screen: 'index'
|
||||
})
|
||||
: () => this.props.navigation.navigate("login")}
|
||||
style={styles.list}
|
||||
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}}
|
||||
/>
|
||||
</Card>
|
||||
</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"
|
||||
}
|
||||
}
|
||||
|
|
載入中…
新增問題並參考