|
|
@@ -13,6 +13,8 @@ import Dialog from '../../components/Dialog';
|
|
|
import { PageList } from '../Router';
|
|
|
import CheckBoxText from '../../components/CheckBoxText';
|
|
|
import TextView from '../../components/TextView';
|
|
|
+import { Linking } from 'react-native';
|
|
|
+import app from "../../../app.json";
|
|
|
|
|
|
export const AutoLogin = async (back) => {
|
|
|
const data = await getStorageJsonSync('loginData')
|
|
|
@@ -118,7 +120,7 @@ export default class Login extends React.Component {
|
|
|
}
|
|
|
|
|
|
getBackTopPosition() {
|
|
|
- return isIOS ? statusHeight : 4;
|
|
|
+ return statusHeight;
|
|
|
}
|
|
|
|
|
|
togglePassword() {
|
|
|
@@ -127,6 +129,10 @@ export default class Login extends React.Component {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ startWebApp() {
|
|
|
+ Linking.openURL(app.product ? "https://webapp.chargeco.global/" : "https://uat.chargeco.global/webapp")
|
|
|
+ }
|
|
|
+
|
|
|
render() {
|
|
|
return (
|
|
|
<View style={ui.flex1}>
|
|
|
@@ -240,6 +246,10 @@ export default class Login extends React.Component {
|
|
|
{/* <Text
|
|
|
style={styles.linksText}
|
|
|
onPress={() => startPage(PageList.register, {isFleetUser: true})}>{$t('sign.registerDriverUser')}</Text> */}
|
|
|
+ <TextView style={{color: textPrimary, paddingTop: 12}}>Or</TextView>
|
|
|
+ <TextView
|
|
|
+ style={styles.linksText}
|
|
|
+ onPress={() => this.startWebApp()}>Continue As Guest</TextView>
|
|
|
</View>
|
|
|
</ScrollView>
|
|
|
</View>
|