Initial commit for Greenlens
This commit is contained in:
@@ -160,7 +160,7 @@ export default function LoginScreen() {
|
||||
{/* Sign Up Link */}
|
||||
<TouchableOpacity
|
||||
style={[styles.secondaryBtn, { borderColor: colors.borderStrong, backgroundColor: colors.surface }]}
|
||||
onPress={() => router.push('/auth/signup')}
|
||||
onPress={() => router.replace('/auth/signup')}
|
||||
activeOpacity={0.82}
|
||||
>
|
||||
<Text style={[styles.secondaryBtnText, { color: colors.text }]}>
|
||||
@@ -186,9 +186,9 @@ const styles = StyleSheet.create({
|
||||
marginBottom: 32,
|
||||
},
|
||||
logoIcon: {
|
||||
width: 88,
|
||||
height: 88,
|
||||
borderRadius: 20,
|
||||
width: 56,
|
||||
height: 56,
|
||||
borderRadius: 14,
|
||||
marginBottom: 16,
|
||||
},
|
||||
appName: {
|
||||
|
||||
@@ -20,8 +20,9 @@ import { AuthService } from '../../services/authService';
|
||||
import AsyncStorage from '@react-native-async-storage/async-storage';
|
||||
|
||||
export default function SignupScreen() {
|
||||
const { isDarkMode, colorPalette, hydrateSession } = useApp();
|
||||
const { isDarkMode, colorPalette, hydrateSession, getPendingPlant } = useApp();
|
||||
const colors = useColors(isDarkMode, colorPalette);
|
||||
const pendingPlant = getPendingPlant();
|
||||
|
||||
const [name, setName] = useState('');
|
||||
const [email, setEmail] = useState('');
|
||||
@@ -103,6 +104,16 @@ export default function SignupScreen() {
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
{/* Pending Plant Hint */}
|
||||
{pendingPlant && (
|
||||
<View style={[styles.pendingHint, { backgroundColor: `${colors.primarySoft}40`, borderColor: `${colors.primaryDark}40` }]}>
|
||||
<Ionicons name="sparkles" size={18} color={colors.primaryDark} />
|
||||
<Text style={[styles.pendingHintText, { color: colors.primaryDark }]}>
|
||||
Deine gescannte Pflanze ({pendingPlant.result.name}) wird nach der Registrierung automatisch in deinem Profil gespeichert.
|
||||
</Text>
|
||||
</View>
|
||||
)}
|
||||
|
||||
{/* Card */}
|
||||
<View style={[styles.card, { backgroundColor: colors.surface, borderColor: colors.cardBorder, shadowColor: colors.cardShadow }]}>
|
||||
{/* Name */}
|
||||
@@ -256,7 +267,7 @@ export default function SignupScreen() {
|
||||
</View>
|
||||
|
||||
{/* Login link */}
|
||||
<TouchableOpacity style={styles.loginLink} onPress={() => router.back()}>
|
||||
<TouchableOpacity style={styles.loginLink} onPress={() => router.replace('/auth/login')}>
|
||||
<Text style={[styles.loginLinkText, { color: colors.textSecondary }]}>
|
||||
Bereits ein Konto?{' '}
|
||||
<Text style={{ color: colors.primary, fontWeight: '600' }}>Anmelden</Text>
|
||||
@@ -291,9 +302,9 @@ const styles = StyleSheet.create({
|
||||
alignItems: 'center',
|
||||
},
|
||||
logoIcon: {
|
||||
width: 88,
|
||||
height: 88,
|
||||
borderRadius: 20,
|
||||
width: 56,
|
||||
height: 56,
|
||||
borderRadius: 14,
|
||||
marginBottom: 16,
|
||||
},
|
||||
appName: {
|
||||
@@ -391,4 +402,19 @@ const styles = StyleSheet.create({
|
||||
loginLinkText: {
|
||||
fontSize: 15,
|
||||
},
|
||||
pendingHint: {
|
||||
flexDirection: 'row',
|
||||
alignItems: 'center',
|
||||
padding: 16,
|
||||
borderRadius: 16,
|
||||
borderWidth: 1,
|
||||
marginBottom: 20,
|
||||
gap: 12,
|
||||
},
|
||||
pendingHintText: {
|
||||
flex: 1,
|
||||
fontSize: 13,
|
||||
fontWeight: '600',
|
||||
lineHeight: 18,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user