|
@@ -2,7 +2,7 @@
|
2
|
2
|
|
3
|
3
|
import * as React from 'react';
|
4
|
4
|
import {Avatar, Card, List, withTheme} from 'react-native-paper';
|
5
|
|
-import {StyleSheet} from "react-native";
|
|
5
|
+import {StyleSheet, View} from "react-native";
|
6
|
6
|
import {DrawerNavigationProp} from "@react-navigation/drawer";
|
7
|
7
|
import type {CustomTheme} from "../../managers/ThemeManager";
|
8
|
8
|
import i18n from 'i18n-js';
|
|
@@ -25,31 +25,42 @@ class ActionsDashBoardItem extends React.Component<Props> {
|
25
|
25
|
render() {
|
26
|
26
|
const isLoggedIn = this.props.isLoggedIn;
|
27
|
27
|
return (
|
28
|
|
- <Card style={{
|
29
|
|
- ...styles.card,
|
30
|
|
- borderColor: this.props.theme.colors.primary,
|
31
|
|
- }}>
|
|
28
|
+ <View>
|
|
29
|
+ <Card style={{
|
|
30
|
+ ...styles.card,
|
|
31
|
+ borderColor: this.props.theme.colors.primary,
|
|
32
|
+ }}>
|
|
33
|
+ <List.Item
|
|
34
|
+ title={i18n.t("homeScreen.dashboard.amicaleTitle")}
|
|
35
|
+ description={isLoggedIn
|
|
36
|
+ ? i18n.t("homeScreen.dashboard.amicaleConnected")
|
|
37
|
+ : i18n.t("homeScreen.dashboard.amicaleConnect")}
|
|
38
|
+ left={props => <Avatar.Image
|
|
39
|
+ {...props}
|
|
40
|
+ size={40}
|
|
41
|
+ source={ICON_AMICALE}
|
|
42
|
+ style={styles.avatar}/>}
|
|
43
|
+ right={props => <List.Icon {...props} icon={isLoggedIn
|
|
44
|
+ ? "chevron-right"
|
|
45
|
+ : "login"}/>}
|
|
46
|
+ onPress={isLoggedIn
|
|
47
|
+ ? () => this.props.navigation.navigate("services", {
|
|
48
|
+ screen: 'index'
|
|
49
|
+ })
|
|
50
|
+ : () => this.props.navigation.navigate("login")}
|
|
51
|
+ style={styles.list}
|
|
52
|
+ />
|
|
53
|
+ </Card>
|
32
|
54
|
<List.Item
|
33
|
|
- title={i18n.t("homeScreen.dashboard.amicaleTitle")}
|
34
|
|
- description={isLoggedIn
|
35
|
|
- ? i18n.t("homeScreen.dashboard.amicaleConnected")
|
36
|
|
- : i18n.t("homeScreen.dashboard.amicaleConnect")}
|
37
|
|
- left={props => <Avatar.Image
|
38
|
|
- {...props}
|
39
|
|
- size={40}
|
40
|
|
- source={ICON_AMICALE}
|
41
|
|
- style={styles.avatar}/>}
|
42
|
|
- right={props => <List.Icon {...props} icon={isLoggedIn
|
43
|
|
- ? "chevron-right"
|
44
|
|
- : "login"}/>}
|
45
|
|
- onPress={isLoggedIn
|
46
|
|
- ? () => this.props.navigation.navigate("services", {
|
47
|
|
- screen: 'index'
|
48
|
|
- })
|
49
|
|
- : () => this.props.navigation.navigate("login")}
|
50
|
|
- style={styles.list}
|
|
55
|
+ title={i18n.t("feedbackScreen.homeButtonTitle")}
|
|
56
|
+ description={i18n.t("feedbackScreen.homeButtonSubtitle")}
|
|
57
|
+ left={props => <List.Icon {...props} icon={"bug"}/>}
|
|
58
|
+ right={props => <List.Icon {...props} icon={"chevron-right"}/>}
|
|
59
|
+ onPress={() => this.props.navigation.navigate("feedback")}
|
|
60
|
+ style={{...styles.list, marginLeft: 10, marginRight: 10}}
|
51
|
61
|
/>
|
52
|
|
- </Card>
|
|
62
|
+ </View>
|
|
63
|
+
|
53
|
64
|
);
|
54
|
65
|
}
|
55
|
66
|
}
|
|
@@ -57,9 +68,7 @@ class ActionsDashBoardItem extends React.Component<Props> {
|
57
|
68
|
const styles = StyleSheet.create({
|
58
|
69
|
card: {
|
59
|
70
|
width: 'auto',
|
60
|
|
- marginLeft: 10,
|
61
|
|
- marginRight: 10,
|
62
|
|
- marginTop: 10,
|
|
71
|
+ margin: 10,
|
63
|
72
|
borderWidth: 1,
|
64
|
73
|
},
|
65
|
74
|
avatar: {
|