forked from vergnet/application-amicale
Use built in webview to display password reset page
This commit is contained in:
parent
4cdadbc6c1
commit
57f7716700
1 changed files with 3 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
// @flow
|
// @flow
|
||||||
|
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import {Animated, KeyboardAvoidingView, Linking, StyleSheet, View} from "react-native";
|
import {Animated, KeyboardAvoidingView, StyleSheet, View} from "react-native";
|
||||||
import {Avatar, Button, Card, HelperText, Paragraph, TextInput, withTheme} from 'react-native-paper';
|
import {Avatar, Button, Card, HelperText, Paragraph, TextInput, withTheme} from 'react-native-paper';
|
||||||
import ConnectionManager from "../../managers/ConnectionManager";
|
import ConnectionManager from "../../managers/ConnectionManager";
|
||||||
import i18n from 'i18n-js';
|
import i18n from 'i18n-js';
|
||||||
|
@ -30,7 +30,7 @@ type State = {
|
||||||
|
|
||||||
const ICON_AMICALE = require('../../../assets/amicale.png');
|
const ICON_AMICALE = require('../../../assets/amicale.png');
|
||||||
|
|
||||||
const RESET_PASSWORD_PATH = "https://www.amicale-insat.fr//password/reset";
|
const RESET_PASSWORD_PATH = "https://www.amicale-insat.fr/password/reset";
|
||||||
|
|
||||||
const emailRegex = /^.+@.+\..+$/;
|
const emailRegex = /^.+@.+\..+$/;
|
||||||
|
|
||||||
|
@ -70,7 +70,6 @@ class LoginScreen extends React.Component<Props, State> {
|
||||||
else
|
else
|
||||||
this.nextScreen = null;
|
this.nextScreen = null;
|
||||||
}
|
}
|
||||||
console.log(this.nextScreen);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
showErrorDialog = (error: number) =>
|
showErrorDialog = (error: number) =>
|
||||||
|
@ -88,7 +87,7 @@ class LoginScreen extends React.Component<Props, State> {
|
||||||
this.props.navigation.replace(this.nextScreen);
|
this.props.navigation.replace(this.nextScreen);
|
||||||
};
|
};
|
||||||
|
|
||||||
onResetPasswordClick = () => Linking.openURL(RESET_PASSWORD_PATH);
|
onResetPasswordClick = () => this.props.navigation.navigate('amicale-website', {path: RESET_PASSWORD_PATH});
|
||||||
|
|
||||||
validateEmail = () => this.setState({isEmailValidated: true});
|
validateEmail = () => this.setState({isEmailValidated: true});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue