diff --git a/Views/Login.js b/Views/Login.js
index d13d40f..bdc39e9 100644
--- a/Views/Login.js
+++ b/Views/Login.js
@@ -23,8 +23,10 @@ export default function App({ navigation, route }) {
-
- {"<- Not an EMI family memeber?"}
+
+ {
+ alert("Register your church on fellowshipapps.com");
+ }}>{"<- Not an EMI family member?"}
);
diff --git a/Views/NewPost.js b/Views/NewPost.js
index b7ed8c2..1a5434a 100644
--- a/Views/NewPost.js
+++ b/Views/NewPost.js
@@ -1,5 +1,5 @@
import React, { useEffect, useState } from 'react';
-import { View, TextInput, Image } from "react-native";
+import { View, TextInput, Image, ScrollView } from "react-native";
import { Text, Button, Divider } from "react-native-paper";
import { SafeAreaView } from "react-native-safe-area-context";
import API from './../API.js';
@@ -96,13 +96,14 @@ let NewPostView = (props) => {
API.newPost(postContent + " " + extraContent.join(" "), props.route.params?.toProfile).then((newPost) => {
setPostContent('');
setExtraContent([]);
- navigation.navigate('Feed', {reRender: Math.random()});
+ navigation.navigate('Feed', { reRender: Math.random() });
//if (newPostCB) newPostCB(newPost);
});
}
return (
-
+
+
{i18n.t("message.statusUpdate")}:
+
)
}
diff --git a/components/Login.js b/components/Login.js
index a930b8d..d1221b2 100644
--- a/components/Login.js
+++ b/components/Login.js
@@ -10,16 +10,33 @@ let LoginForm = () => {
const [email, setEmail] = useState('');
const [password, setPassword] = useState('');
const [error, setError] = useState('');
+ const [tries, setTries] = useState(0);
const navigation = useNavigation();
+ const resetPasswordBol = tries > 2;
- const loginCall = async ()=>{
+ const resetPassword = async () => {
+ await API.resetPassword(email);
+ alert("We sent you instructions to your email!")
+ }
+
+ const loginCall = async () => {
let r = await API.logIn(email.trim(), password);
if (r.status === "ok") return navigation.reset({
- index: 0,
- routes: [{ name: 'MainNavigation' }],
- });
+ index: 0,
+ routes: [{ name: 'MainNavigation' }],
+ });
//console.log(r)
setError(r.status);
+ if (r.status === 'incorrect password') {
+ if (resetPasswordBol) {
+ await resetPassword();
+ setTries(0);
+ } else {
+ setTries(tries + 1);
+ }
+ } else {
+ setTries(0);
+ }
//alert(i18n.t('message.wrongInformation'))
};
@@ -29,7 +46,7 @@ let LoginForm = () => {
style={styles.logo}
source={require('./../assets/icon.png')}
/>
- EMI Social
+ EMI Fellowship
{i18n.t("message.login")}
{
autoComplete='email'
autoCorrect={false}
mode="outlined"
+ keyboardType='email-address'
/>
{error !== '' && error !== 'incorrect password' ?
{i18n.t("message.invalidEmail")}
@@ -61,12 +79,26 @@ let LoginForm = () => {
{error === 'incorrect password' ?
{i18n.t("message.reviewPassword")}
: <>>}
-
+
+
+ {
+ resetPasswordBol ? : <>>
+ }
+
);
}
@@ -92,17 +124,17 @@ const styles = StyleSheet.create({
color: '#777',
alignContent: 'center'
},
- logo:{
- width: 250,
+ logo: {
+ width: 250,
height: 250,
justifyContent: 'center',
alignItems: 'center',
},
- input:{
+ input: {
backgroundColor: 'white',
width: "80%"
},
- button:{
+ button: {
marginTop: 10,
}
diff --git a/components/VideoPlayer.js b/components/VideoPlayer.js
index 5420c97..1b14e1b 100644
--- a/components/VideoPlayer.js
+++ b/components/VideoPlayer.js
@@ -24,11 +24,12 @@ const VideoPlayer = ({ videosFiles, postId, profileId, poster, videoUrl, videoSt
setChosenVideo(chosenVideo);
}, [videoUrl, postId]);
- const onLoad = ()=>{
+ const onLoad = async ()=>{
if(!viewer.data[postId]) return 0;
console.log(postId + " loaded")
- video.current.setPositionAsync(viewer.data[postId].time*1000);
- video.current.presentFullscreenPlayer();
+ await video.current.setPositionAsync(viewer.data[postId].time*1000);
+ //video.current.isPlaying = true;
+ //video.current.presentFullscreenPlayer();
};
//console.log("status", status)
@@ -56,7 +57,7 @@ const VideoPlayer = ({ videosFiles, postId, profileId, poster, videoUrl, videoSt
source={{
uri: chosenVideo.length ? chosenVideo[chosenVideo.length-1].link : '',
}}
- useNativeControls={false}
+ useNativeControls={true}
shouldPlay={true}
resizeMode="contain"
onPlaybackStatusUpdate={status => setStatus(() => status)}
diff --git a/i18nMessages.js b/i18nMessages.js
index c7bb0c9..5704f27 100644
--- a/i18nMessages.js
+++ b/i18nMessages.js
@@ -33,8 +33,10 @@ const messages = {
loading: "Loading",
login: 'Login',
email: "Email",
+ cancel: "Cancel",
password: "Password",
rpassword: "Repeat Password",
+ resetPassword: "Reset password",
register: "Register",
name: "Nombre",
lastName: "Last Name",
@@ -65,7 +67,7 @@ const messages = {
IKnowThisPerson: "I know this person",
update: "Update",
invalidEmail: "Email address is invalid!",
- reviewPassword: "Please review your passwrod.",
+ reviewPassword: "Please review your password.",
updatePhoto: "Update Photo",
optional: "Optional",
birthday: "Birthday",
@@ -103,8 +105,10 @@ const messages = {
loading: "Cargando",
login: 'Inicia Sesión',
email: "Correo Electronico",
+ cancel: "Cancelar",
password: "Contraseña",
rpassword: "Confirma tu Contraseña",
+ resetPassword: "Recuperar Contraseña",
register: "Registrate",
name: 'Nombre',
lastName: "Apeido",