diff --git a/frontend/src/App.jsx b/frontend/src/App.jsx index 07f2d45..ec7b175 100644 --- a/frontend/src/App.jsx +++ b/frontend/src/App.jsx @@ -2751,6 +2751,8 @@ function App() { treeNotFound={treeNotFound} loading={tree.gateLoading} errorMessage={tree.gateError} + connected={Boolean(auth.userAuth.token)} + connectedName={accountUser?.firstName || ''} onSubmit={handleGateUnlock} onUseDemo={handleUseDemo} onUseAccount={handleUseAccount} diff --git a/frontend/src/components/AccessGate.jsx b/frontend/src/components/AccessGate.jsx index 7631818..623bb03 100644 --- a/frontend/src/components/AccessGate.jsx +++ b/frontend/src/components/AccessGate.jsx @@ -23,6 +23,8 @@ const AccessGate = ({ treeNotFound = false, loading, errorMessage, + connected = false, + connectedName = '', onSubmit, onUseAccount, }) => { @@ -86,6 +88,21 @@ const AccessGate = ({ {!treeNotFound && (
+ {connected && ( +
+ {connectedName ? ( + /^[aeiouyàâäéèêëîïôöùûüh]/i.test(connectedName) + ? t("Vous êtes sur le compte d'{name}", { name: connectedName }) + : t('Vous êtes sur le compte de {name}', { name: connectedName }) + ) : ( + t('Vous êtes sur votre compte.') + )} + + {t("Tapez une fois le mot de passe reçu avec le lien. Ensuite, l'arbre s'ouvrira directement.")} + +
+ )} + {!initialTreeId && (
@@ -103,7 +120,7 @@ const AccessGate = ({ )}
- + -

{t("Facultatif. Il sert à savoir qui est venu voir l'arbre.")}

+

{t("Il sert à savoir qui est venu voir l'arbre.")}

- + - {t("Ouvrir l'arbre")} + {t("Voir l'arbre")} )} {treeNotFound && onUseAccount && ( )} @@ -149,10 +166,10 @@ const AccessGate = ({ {onUseAccount && !treeNotFound && (
)} diff --git a/frontend/src/components/AccountDashboard.jsx b/frontend/src/components/AccountDashboard.jsx index 6271e33..e1ee503 100644 --- a/frontend/src/components/AccountDashboard.jsx +++ b/frontend/src/components/AccountDashboard.jsx @@ -203,19 +203,19 @@ const AccountDashboard = ({ disabled={loading} >

- {isRegister ? t('Vous avez déjà un compte ?') : t('Pas encore de compte ?')}{' '} + {isRegister ? t('Déjà inscrit ?') : t('Pas encore de compte ?')}{' '}

diff --git a/frontend/src/components/AccountScreens.css b/frontend/src/components/AccountScreens.css index 0058537..9b5f6aa 100644 --- a/frontend/src/components/AccountScreens.css +++ b/frontend/src/components/AccountScreens.css @@ -41,6 +41,10 @@ .pz-gate-owner-text { display: grid; gap: 2px; min-width: 0; } .pz-gate-owner-text strong { color: var(--pz-ink); font-weight: 500; } +/* Porte, personne déjà connectée : dit quel compte est ouvert et ce qu'il faut faire une fois */ +.access-gate-session { display: grid; gap: 4px; padding: 12px 14px; border-radius: var(--pz-r-m); background: var(--pz-a50); border: 1px solid var(--pz-a100); color: var(--pz-ink); font: 400 14px/1.45 var(--pz-sans); } +.access-gate-session-step { color: var(--pz-ink-2); } + /* Fenêtre « Mon compte » (personne liée) */ .ap-linked { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--pz-r-m); background: var(--pz-a50); border: 1px solid var(--pz-a100); } .ap-avatar { width: 44px; height: 44px; flex: none; display: grid; place-items: center; overflow: hidden; border-radius: 50%; background: var(--pz-a100); color: var(--pz-a700); font: 400 20px/1 var(--pz-serif); } diff --git a/frontend/src/components/navbar/ContextualNavbar.jsx b/frontend/src/components/navbar/ContextualNavbar.jsx index eee10eb..fa18e99 100644 --- a/frontend/src/components/navbar/ContextualNavbar.jsx +++ b/frontend/src/components/navbar/ContextualNavbar.jsx @@ -307,7 +307,7 @@ function ContextualNavbar({ } label={authenticated ? t('Mon compte') : t('Se connecter')} - onClick={() => onProfileClick?.(authenticated ? 'login' : 'register')} + onClick={() => onProfileClick?.('login')} /> ) diff --git a/frontend/src/i18n/en/compte.js b/frontend/src/i18n/en/compte.js index 90ea2bf..38ed6cc 100644 --- a/frontend/src/i18n/en/compte.js +++ b/frontend/src/i18n/en/compte.js @@ -205,4 +205,16 @@ export default { "Visiteur": "Visitor", "Exemple": "Example", "Arbre exemple": "Sample tree", + "Votre prénom (facultatif)": "Your first name (optional)", + "Il sert à savoir qui est venu voir l'arbre.": "It shows who came to see the tree.", + "Mot de passe reçu avec le lien": "Password received with the link", + "Créer mon propre arbre": "Create my own tree", + "J'ai déjà un compte": "I already have an account", + "Je n'ai pas de compte": "I don't have an account", + "J'ai reçu un lien de famille": "I received a family link", + "Déjà inscrit ?": "Already signed up?", + "Vous êtes sur le compte d'{name}": "You are signed in as {name}", + "Vous êtes sur le compte de {name}": "You are signed in as {name}", + "Vous êtes sur votre compte.": "You are signed in to your account.", + "Tapez une fois le mot de passe reçu avec le lien. Ensuite, l'arbre s'ouvrira directement.": "Enter the password you received with the link once. After that, the tree opens directly.", } diff --git a/landing/src/App.jsx b/landing/src/App.jsx index a81c5b7..b316f59 100644 --- a/landing/src/App.jsx +++ b/landing/src/App.jsx @@ -769,7 +769,7 @@ function HeroGraph({ className = '', label }) { // ─── Header ─────────────────────────────────────────────────────────────────── -function Header({ t, onCta, elevated }) { +function Header({ t, onCta, loginHref, elevated }) { return (
@@ -778,6 +778,7 @@ function Header({ t, onCta, elevated }) { {t.nav.how} {t.nav.demo} {t.nav.privacy && {t.nav.privacy}} + {t.nav.login}
@@ -910,6 +911,8 @@ const appSource = () => { // Les CTA mènent à la création de compte dans l'app const appSignupUrl = () => `https://app.parenthese.io/?account=register&source=${appSource()}` +// Un compte déjà créé : la connexion, pas l'inscription (sans source : rendu au build, pas de window) +const appLoginUrl = () => 'https://app.parenthese.io/?account=login' export default function App({ locale = 'fr' }) { const t = COPY[locale] @@ -985,7 +988,7 @@ export default function App({ locale = 'fr' }) { return (
-
goToSignup('header')} elevated={headerElevated} /> +
goToSignup('header')} loginHref={withAppQuery(appLoginUrl(), locale)} elevated={headerElevated} />
{/* ─── HERO ────────────────────────────────────────────────────── */} @@ -1122,6 +1125,7 @@ export default function App({ locale = 'fr' }) {