diff --git a/app/(tabs)/login.tsx b/app/(tabs)/login.tsx index 92733c7..e332311 100644 --- a/app/(tabs)/login.tsx +++ b/app/(tabs)/login.tsx @@ -3,6 +3,7 @@ import ForgetPwd from '@/components/login/forgetPwd'; import Login from '@/components/login/login'; import PhoneLogin from '@/components/login/phoneLogin'; import SignUp from '@/components/login/signUp'; +import PrivacyModal from '@/components/owner/qualification/privacy'; import { ThemedText } from '@/components/ThemedText'; import { ThemedView } from '@/components/ThemedView'; import { useLocalSearchParams, useRouter } from 'expo-router'; @@ -27,6 +28,9 @@ const LoginScreen = () => { // 判断是否有白边 const statusBarHeight = StatusBar?.currentHeight ?? 0; + // 协议弹窗 + const [modalVisible, setModalVisible] = useState(false); + const [modalType, setModalType] = useState<'ai' | 'terms' | 'privacy' | 'user' | 'membership'>('privacy'); useEffect(() => { const keyboardWillShowListener = Keyboard.addListener( Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow', @@ -71,12 +75,15 @@ const LoginScreen = () => { bounces={false} > + + Awake your Memo + 0 ? windowHeight - containerHeight - 210 + statusBarHeight : 0, - transform: [{ translateX: -200 }, { translateY: keyboardOffset > 0 ? -keyboardOffset + statusBarHeight : -keyboardOffset }] + top: containerHeight > 0 ? windowHeight - containerHeight - 210 + statusBarHeight - insets.top - 28 : 0, + transform: [{ translateX: -200 }, { translateY: keyboardOffset > 0 ? -keyboardOffset + statusBarHeight - insets.top - 28 : -keyboardOffset }] }} > { @@ -90,8 +97,8 @@ const LoginScreen = () => { 0 ? windowHeight - containerHeight - 1 + statusBarHeight : 0, - transform: [{ translateX: -39.5 }, { translateY: keyboardOffset > 0 ? -4 - keyboardOffset + statusBarHeight : -4 - keyboardOffset }] + top: containerHeight > 0 ? windowHeight - containerHeight - 1 + statusBarHeight - insets.top - 30 : 0, + transform: [{ translateX: -39.5 }, { translateY: keyboardOffset > 0 ? -4 - keyboardOffset + statusBarHeight - insets.top - 30 : -4 - keyboardOffset }] }} > @@ -100,8 +107,8 @@ const LoginScreen = () => { { return components[status as keyof typeof components] || components.login; })()} - {status == 'login' || !status && - - - {status === 'login' || !status ? t('auth.agree.logintext', { ns: 'login' }) : t('auth.agree.singupText', { ns: 'login' })} - - { }}> - - {t('auth.agree.terms', { ns: 'login' })} + + {status == 'login' || !status && + + + {status === 'login' || !status ? t('auth.agree.logintext', { ns: 'login' }) : t('auth.agree.singupText', { ns: 'login' })} - - - {t('auth.agree.join', { ns: 'login' })} - - { }}> - - {t('auth.agree.privacyPolicy', { ns: 'login' })} + { setModalVisible(true); setModalType('terms') }}> + + {t('auth.agree.terms', { ns: 'login' })} + + + + {t('auth.agree.join', { ns: 'login' })} - - - } + { setModalVisible(true); setModalType('privacy') }}> + + {t('auth.agree.privacyPolicy', { ns: 'login' })} + + + + } + + diff --git a/components/login/login.tsx b/components/login/login.tsx index 2e528be..32c27cb 100644 --- a/components/login/login.tsx +++ b/components/login/login.tsx @@ -138,6 +138,19 @@ const Login = ({ updateUrlParam, setError, setShowPassword, showPassword }: Logi )} + + + + OR + + + + + + + + + {t('auth.login.signUpMessage', { ns: 'login' })} @@ -156,12 +169,28 @@ const styles = StyleSheet.create({ container: { flex: 1, }, + loginTypeContainer: { + display: "flex", + flexDirection: "column", + justifyContent: 'center', + alignItems: 'center', + gap: 16, + width: "70%" + }, + loginType: { + borderRadius: 12, + width: 54, + height: 54, + textAlign: 'center', + backgroundColor: '#FADBA1' + }, inputContainer: { marginBottom: 20, }, inputLabel: { fontSize: 16, - color: '#1F2937', + color: '#AC7E35', + fontWeight: '600', marginBottom: 8, marginLeft: 8, }, @@ -169,7 +198,7 @@ const styles = StyleSheet.create({ borderRadius: 12, paddingHorizontal: 16, paddingVertical: 12, - fontSize: 16, + fontSize: 14, textAlignVertical: 'center', backgroundColor: '#FFF8DE' }, @@ -186,8 +215,8 @@ const styles = StyleSheet.create({ marginBottom: 24, }, forgotPasswordText: { - color: '#1F2937', - fontSize: 14, + color: '#AC7E35', + fontSize: 11, }, loginButton: { width: '100%', @@ -200,6 +229,7 @@ const styles = StyleSheet.create({ loginButtonText: { color: '#FFFFFF', fontWeight: '600', + fontSize: 18, }, signupContainer: { flexDirection: 'row', @@ -207,14 +237,15 @@ const styles = StyleSheet.create({ marginTop: 8, }, signupText: { - color: '#1F2937', - fontSize: 14, + color: '#AC7E35', + fontSize: 17, }, signupLink: { color: '#E2793F', - fontSize: 14, + fontSize: 17, fontWeight: '600', marginLeft: 4, + textDecorationLine: 'underline', }, }); diff --git a/components/login/signUp.tsx b/components/login/signUp.tsx index 8d2790d..22f0ef3 100644 --- a/components/login/signUp.tsx +++ b/components/login/signUp.tsx @@ -353,8 +353,9 @@ const styles = StyleSheet.create({ overflow: 'hidden', }, inputLabel: { - fontSize: 16, - color: '#1F2937', + fontSize: 14, + color: '#AC7E35', + fontWeight: '600', marginBottom: 8, marginLeft: 8, }, diff --git a/i18n/locales/en/login.json b/i18n/locales/en/login.json index 297dd67..c4d15e4 100644 --- a/i18n/locales/en/login.json +++ b/i18n/locales/en/login.json @@ -73,7 +73,7 @@ "logintext": "By logging in, you agree to our", "singupText": "By signing up, you agree to our", "terms": " Terms", - "join": "&", + "join": " and have read our", "privacyPolicy": " Privacy Policy." }, "welcome": {