diff --git a/app/client/mobile/src/access/Access.styled.ts b/app/client/mobile/src/access/Access.styled.ts index 6344653e..39e73d97 100644 --- a/app/client/mobile/src/access/Access.styled.ts +++ b/app/client/mobile/src/access/Access.styled.ts @@ -140,8 +140,17 @@ export const styles = StyleSheet.create({ content: { width: 300, padding: 16, + display: 'flex', + alignItems: 'center', + justifyContent: 'center', + gap: 16, }, close: { paddingTop: 8, }, + controls: { + display: 'flex', + flexDirection: 'row', + gap: 16, + }, }); diff --git a/app/client/mobile/src/access/Access.tsx b/app/client/mobile/src/access/Access.tsx index 07fa97ba..b933076b 100644 --- a/app/client/mobile/src/access/Access.tsx +++ b/app/client/mobile/src/access/Access.tsx @@ -12,6 +12,7 @@ import left from '../images/login.png'; import {IconButton, Modal, Surface, Text, TextInput, Button} from 'react-native-paper'; import {SafeAreaView} from 'react-native-safe-area-context'; import { BlurView } from "@react-native-community/blur"; +import { InputCode } from '../utils/InputCode'; export function Access() { const [text, setText] = useState(''); @@ -20,6 +21,7 @@ export function Access() { const [showConfirm, setShowConfirm] = useState(false); const [showPassword, setShowPassword] = useState(false); const [alert, setAlert] = useState(false); + const [otp, setOtp] = useState(false); const login = async () => { if (!state.loading) { @@ -34,7 +36,7 @@ export function Access() { } else if (state.mode === 'admin') { await actions.adminLogin(); } - console.log('OTP CLOSE'); + setOtp(false); } catch (err) { console.log(err.message); if ( @@ -47,7 +49,7 @@ export function Access() { } else { setDisabled(false); } - console.log('DONE LOGIN'); + setOtp(true); } else { setAlert(true); } @@ -384,6 +386,32 @@ export function Access() { + setOtp(false)} + contentContainerStyle={styles.modal}> + + {state.strings.mfaTitle} + {state.strings.mfaEnter} + + + + + + + ); }