feat: navbar

This commit is contained in:
jinyaqiu 2025-08-07 10:41:57 +08:00
parent 928d603f32
commit 399460a259
6 changed files with 23 additions and 22 deletions

View File

@ -75,8 +75,8 @@ const LoginScreen = () => {
bounces={false} bounces={false}
> >
<ThemedView className="flex-1 bg-bgPrimary justify-end"> <ThemedView className="flex-1 bg-bgPrimary justify-end">
<View style={{ width: "100%", alignItems: "center", marginTop: insets.top + 8 }}> <View style={{ width: "100%", alignItems: "center", marginTop: insets.top + 8, opacity: keyboardOffset === 0 ? 1 : 0 }}>
<ThemedText style={{ fontSize: 20, fontWeight: 'bold', color: "#fff" }}>Awake your Memo</ThemedText> <ThemedText style={{ fontSize: 20, fontWeight: 'bold', color: "#fff" }}>{t('login:auth.login.titleText')}</ThemedText>
</View> </View>
<View className="flex-1"> <View className="flex-1">
<View <View

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

View File

@ -116,18 +116,18 @@ const AskNavbar = ({ wsStatus }: AskNavbarProps) => {
bottom: 0, bottom: 0,
left: 0, left: 0,
right: 0, right: 0,
height: 80, // Set a fixed height for the navbar height: 80,
flexDirection: 'row', flexDirection: 'row',
justifyContent: 'space-between', justifyContent: 'space-between',
alignItems: 'center', alignItems: 'center',
paddingHorizontal: 32, paddingHorizontal: 32,
backgroundColor: 'transparent', // Make sure it's transparent backgroundColor: 'transparent',
}, },
centerButton: { centerButton: {
position: 'absolute', position: 'absolute',
left: width / 2, left: width / 2,
top: -30, // Adjust this value to move the button up or down top: -30,
marginLeft: -42.5, // Half of the button width (85/2) marginLeft: -49,
width: 85, width: 85,
height: 85, height: 85,
justifyContent: 'center', justifyContent: 'center',
@ -143,8 +143,8 @@ const AskNavbar = ({ wsStatus }: AskNavbarProps) => {
}, },
statusIndicator: { statusIndicator: {
position: 'absolute', position: 'absolute',
top: 15, top: 3,
right: 15, right: 20,
width: 10, width: 10,
height: 10, height: 10,
borderRadius: 5, borderRadius: 5,
@ -162,7 +162,7 @@ const AskNavbar = ({ wsStatus }: AskNavbarProps) => {
return ( return (
<View style={styles.container}> <View style={styles.container}>
<Image source={require('@/assets/images/png/owner/ask.png')} style={{ width: width * 1.18, height: 100, resizeMode: 'cover', marginLeft: -width * 0.07 }} /> <Image source={require('@/assets/images/png/owner/ask.png')} style={{ width: width }} />
<View style={styles.navContainer}> <View style={styles.navContainer}>
<TouchableOpacity <TouchableOpacity
onPress={() => navigateTo('/memo-list')} onPress={() => navigateTo('/memo-list')}

View File

@ -137,6 +137,16 @@ const Login = ({ updateUrlParam, setError, setShowPassword, showPassword }: Logi
</ThemedText> </ThemedText>
)} )}
</TouchableOpacity> </TouchableOpacity>
<View style={styles.signupContainer}>
<ThemedText style={styles.signupText}>
{t('auth.login.signUpMessage', { ns: 'login' })}
</ThemedText>
<TouchableOpacity onPress={handleSignUp}>
<ThemedText style={styles.signupLink}>
{t('auth.login.signUp', { ns: 'login' })}
</ThemedText>
</TouchableOpacity>
</View>
<View style={{ width: "100%", alignItems: "center", opacity: 0 }}> <View style={{ width: "100%", alignItems: "center", opacity: 0 }}>
<View style={styles.loginTypeContainer}> <View style={styles.loginTypeContainer}>
@ -150,17 +160,6 @@ const Login = ({ updateUrlParam, setError, setShowPassword, showPassword }: Logi
</View> </View>
</View> </View>
</View> </View>
<View style={styles.signupContainer}>
<ThemedText style={styles.signupText}>
{t('auth.login.signUpMessage', { ns: 'login' })}
</ThemedText>
<TouchableOpacity onPress={handleSignUp}>
<ThemedText style={styles.signupLink}>
{t('auth.login.signUp', { ns: 'login' })}
</ThemedText>
</TouchableOpacity>
</View>
</View> </View>
); );
}; };

View File

@ -67,7 +67,8 @@
"accountPlaceholder": "Enter your account or email", "accountPlaceholder": "Enter your account or email",
"signUpMessage": "Dont have an account?", "signUpMessage": "Dont have an account?",
"signUp": "Sign up", "signUp": "Sign up",
"phoneLogin": "Phone Login" "phoneLogin": "Phone Login",
"titleText": "Awake your Memo"
}, },
"agree": { "agree": {
"logintext": "By logging in, you agree to our", "logintext": "By logging in, you agree to our",

View File

@ -67,7 +67,8 @@
"accountPlaceholder": "请输入您的账号或邮箱", "accountPlaceholder": "请输入您的账号或邮箱",
"signUpMessage": "还没有账号?", "signUpMessage": "还没有账号?",
"signUp": "注册", "signUp": "注册",
"phoneLogin": "手机号登录" "phoneLogin": "手机号登录",
"titleText": "Awake your Memo"
}, },
"agree": { "agree": {
"logintext": "登录即表示您同意我们的", "logintext": "登录即表示您同意我们的",