From 47a30301006ddd3f20c9b419fa54249fd7453d02 Mon Sep 17 00:00:00 2001 From: Tony AVERTY Date: Wed, 7 Oct 2026 14:33:36 +0200 Subject: [PATCH] =?UTF-8?q?App=20:=20page=20de=20connexion=20retravaill?= =?UTF-8?q?=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bandeau de marque, formulaire en carte, passage au champ suivant au clavier, affichage facultatif du mot de passe, lien vers les formules. Co-Authored-By: Claude Opus 5.5 --- pro/app/login.tsx | 124 +++++++++++++++++++++++++++++----------------- 1 file changed, 78 insertions(+), 46 deletions(-) diff --git a/pro/app/login.tsx b/pro/app/login.tsx index 116b2d0..75a4a41 100644 --- a/pro/app/login.tsx +++ b/pro/app/login.tsx @@ -1,17 +1,20 @@ -import { useState } from 'react'; -import { KeyboardAvoidingView, Platform, TextInput, View } from 'react-native'; +import { useRef, useState } from 'react'; +import { KeyboardAvoidingView, Linking, Platform, Pressable, ScrollView, TextInput, View } from 'react-native'; import { SafeAreaView } from 'react-native-safe-area-context'; import { useSession } from '../src/session'; -import { Banner, BrandSymbol, Button, T } from '../src/ui'; +import { Banner, BrandSymbol, Button, Card, T } from '../src/ui'; import { font, useColors } from '../src/theme'; +/** Connexion (Dirigeant et employés) : mêmes identifiants que l'espace web. */ export default function Login() { const c = useColors(); const { login } = useSession(); const [email, setEmail] = useState(''); const [password, setPassword] = useState(''); + const [show, setShow] = useState(false); const [error, setError] = useState(null); const [busy, setBusy] = useState(false); + const pwdRef = useRef(null); async function submit() { setBusy(true); @@ -28,57 +31,86 @@ export default function Login() { const input = { height: 56, borderWidth: 1, - borderColor: '#8A897F', - borderRadius: 12, + borderColor: c.border, + borderRadius: 14, paddingHorizontal: 16, fontSize: 17, fontFamily: font.regular, color: c.text, - backgroundColor: c.surface, + backgroundColor: c.bg, }; return ( - - - - - - MonEspacePro + + {/* Bandeau de marque */} + + + + + + + MonEspacePro + La fidélité de vos clients, au comptoir + + + + + + + + Connexion + {error && {error}} + + E-mail + pwdRef.current?.focus()} + /> + + + + Mot de passe + setShow(!show)}> + {show ? 'Masquer' : 'Afficher'} + + + + +