@boneframework/native-components 1.0.38 → 1.0.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ImageBackground } from "react-native";
|
|
3
|
+
import { LinearGradient } from 'expo-linear-gradient';
|
|
4
|
+
|
|
5
|
+
function Background({children, imagePath = null, gradientColors = null, ...rest}) {
|
|
6
|
+
if (imagePath === null && gradientColors === null) {
|
|
7
|
+
return;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (imagePath !== null) {
|
|
11
|
+
return <ImageBackground source={require(imagePath)} {...rest}>
|
|
12
|
+
{ children }
|
|
13
|
+
</ImageBackground>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
return <LinearGradient colors={gradientColors}>
|
|
17
|
+
{ children }
|
|
18
|
+
</LinearGradient>
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export default Background;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boneframework/native-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.39",
|
|
4
4
|
"description": "Expo Components for Bone Framework",
|
|
5
5
|
"main": "src/Bone.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"react-native-maps": "^1.17.3",
|
|
51
51
|
"react-native-progress": "^5.0.1",
|
|
52
52
|
"toggle-switch-react-native": "^3.3.0",
|
|
53
|
-
"yup": "^1.4.0"
|
|
53
|
+
"yup": "^1.4.0",
|
|
54
|
+
"expo-linear-gradient": "~13.0.2"
|
|
54
55
|
}
|
|
55
56
|
}
|
|
@@ -10,7 +10,7 @@ import useApi from "../hooks/useApi";
|
|
|
10
10
|
import useAuth from "../hooks/useAuth";
|
|
11
11
|
import userApi from "../api/users";
|
|
12
12
|
|
|
13
|
-
function ActivateUserScreen({settings, loginRedirect}) {
|
|
13
|
+
function ActivateUserScreen({settings, loginRedirect, resendActivationEmailRedirect}) {
|
|
14
14
|
const STATUS_BEGIN = 'start_validating';
|
|
15
15
|
const STATUS_VALIDATE = 'validate_email_token';
|
|
16
16
|
const STATUS_RESEND = 'resend_email_token';
|
|
@@ -93,7 +93,7 @@ function ActivateUserScreen({settings, loginRedirect}) {
|
|
|
93
93
|
.request(email)
|
|
94
94
|
.then(setStatus(STATUS_VALIDATE))
|
|
95
95
|
.then(router.back())
|
|
96
|
-
.then(router.navigate(
|
|
96
|
+
.then(router.navigate(resendActivationEmailRedirect))
|
|
97
97
|
.catch(console.error);
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -42,7 +42,7 @@ function RegisterScreen({postRegisterUrl}) {
|
|
|
42
42
|
<ImageBackground blurRadius={10} style={styles.background} source={require('../../../../assets/background.png')} >
|
|
43
43
|
<View style={styles.container}>
|
|
44
44
|
<TouchableOpacity style={styles.cancelButton} onPress={onClose}>
|
|
45
|
-
<Icon size={75} name={'
|
|
45
|
+
<Icon size={75} name={'chevron-left'} />
|
|
46
46
|
</TouchableOpacity>
|
|
47
47
|
<Image style={styles.logo} source={require('../../../../assets/logo.png')} />
|
|
48
48
|
|
|
@@ -81,6 +81,10 @@ const styles = StyleSheet.create({
|
|
|
81
81
|
},
|
|
82
82
|
background: {
|
|
83
83
|
height: '100%'
|
|
84
|
+
},
|
|
85
|
+
cancelButton: {
|
|
86
|
+
top:10,
|
|
87
|
+
left:-20
|
|
84
88
|
}
|
|
85
89
|
})
|
|
86
90
|
|
|
@@ -7,7 +7,43 @@ import Button from '../components/Button';
|
|
|
7
7
|
|
|
8
8
|
import colors from '../../../../config/colors';
|
|
9
9
|
|
|
10
|
-
function WelcomeScreen({
|
|
10
|
+
function WelcomeScreen({
|
|
11
|
+
loginOnPress = () => {},
|
|
12
|
+
registerOnPress = () => {},
|
|
13
|
+
title = 'BONE FRAMEWORK',
|
|
14
|
+
isLoading = false,
|
|
15
|
+
logoTopMargin = 70,
|
|
16
|
+
logoWidth = 150,
|
|
17
|
+
logoHeight = 105
|
|
18
|
+
}) {
|
|
19
|
+
const styles = StyleSheet.create({
|
|
20
|
+
background: {
|
|
21
|
+
flex: 1,
|
|
22
|
+
justifyContent: 'flex-end',
|
|
23
|
+
alignItems: 'center',
|
|
24
|
+
},
|
|
25
|
+
logo: {
|
|
26
|
+
width: logoWidth,
|
|
27
|
+
height: logoHeight
|
|
28
|
+
},
|
|
29
|
+
logoContainer: {
|
|
30
|
+
position: 'absolute',
|
|
31
|
+
top: logoTopMargin,
|
|
32
|
+
alignItems: "center"
|
|
33
|
+
},
|
|
34
|
+
buttonContainer: {
|
|
35
|
+
width: "100%",
|
|
36
|
+
padding: 20
|
|
37
|
+
},
|
|
38
|
+
tagline: {
|
|
39
|
+
fontSize: 50,
|
|
40
|
+
fontWeight: 'bold',
|
|
41
|
+
paddingTop: 10,
|
|
42
|
+
color: colors.white,
|
|
43
|
+
textAlign: 'center'
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
11
47
|
return (
|
|
12
48
|
<ImageBackground blurRadius={10} style={styles.background} source={require('../../../../assets/background.png')} >
|
|
13
49
|
<ActivityIndicator visible={isLoading} type={'overlay'} />
|
|
@@ -22,32 +58,6 @@ function WelcomeScreen({loginOnPress = () => {}, registerOnPress = () => {}, tit
|
|
|
22
58
|
</ImageBackground>
|
|
23
59
|
);
|
|
24
60
|
}
|
|
25
|
-
|
|
26
|
-
background: {
|
|
27
|
-
flex: 1,
|
|
28
|
-
justifyContent: 'flex-end',
|
|
29
|
-
alignItems: 'center',
|
|
30
|
-
},
|
|
31
|
-
logo: {
|
|
32
|
-
width: 150,
|
|
33
|
-
height: 105
|
|
34
|
-
},
|
|
35
|
-
logoContainer: {
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
top: 70,
|
|
38
|
-
alignItems: "center"
|
|
39
|
-
},
|
|
40
|
-
buttonContainer: {
|
|
41
|
-
width: "100%",
|
|
42
|
-
padding: 20
|
|
43
|
-
},
|
|
44
|
-
tagline: {
|
|
45
|
-
fontSize: 50,
|
|
46
|
-
fontWeight: 'bold',
|
|
47
|
-
paddingTop: 10,
|
|
48
|
-
color: colors.white,
|
|
49
|
-
textAlign: 'center'
|
|
50
|
-
},
|
|
51
|
-
});
|
|
61
|
+
|
|
52
62
|
|
|
53
63
|
export default WelcomeScreen;
|