PageSourceSearch

https://themagma.co/assets/Login-EIXedZF2.js

js themagma.co collected 2026-10-07 03:12:55 UTC 2,938 bytes, 1 lines download raw bytes

1import{r as t,A as g,u as y,f as N,j as e,y as d,I as u,G as x,B as C,L as w}from"./index-Fw-OpVYd.js";import{L as c}from"./label-nRo8UekM.js";import{C as M,b as k,c as E,d as L,a as S}from"./card-BvQSkMrG.js";import{C as F}from"./checkbox-Bs-GncWH.js";import"./index-DQpY9Mk9.js";const q=()=>{const[a,p]=t.useState(""),[i,h]=t.useState(""),[o,j]=t.useState(!0),[l,m]=t.useState(!1),{signIn:f}=g(),v=y(),{toast:r}=N(),b=async s=>{if(s.preventDefault(),!a.trim()||!i.trim()){r({title:"Erreur",description:"Veuillez remplir tous les champs",variant:"destructive"});return}m(!0);try{const{error:n}=await f(a,i,o);n?r({title:"Erreur de connexion",description:n.message==="Invalid login credentials"?"Email ou mot de passe incorrect":n.message,variant:"destructive"}):(r({title:"Connexion réussie",description:"Bienvenue !"}),v("/membre/signaux-faibles"))}catch{r({title:"Erreur",description:"Une erreur est survenue",variant:"destructive"})}finally{m(!1)}};return e.jsx("div",{className:"min-h-screen bg-background flex flex-col items-center justify-center px-6 py-16",children:e.jsxs(M,{className:"max-w-md w-full border-border/50 shadow-xl",children:[e.jsxs(k,{className:"text-center space-y-4",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"w-10 h-10 bg-magma-gradient",style:{mask:`url(${d}) center/contain no-repeat`,WebkitMask:`url(${d}) center/contain no-repeat`}})}),e.jsx(E,{className:"text-2xl",children:"Connexion"}),e.jsx(L,{children:"Accédez à votre espace membre Magma"})]}),e.jsxs(S,{children:[e.jsxs("form",{onSubmit:b,className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"email",children:"Email"}),e.jsx(u,{id:"email",type:"email",placeholder:"[email protected]",value:a,onChange:s=>p(s.target.value),required:!0})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{htmlFor:"password",children:"Mot de passe"}),e.jsx(u,{id:"password",type:"password",placeholder:"••••••••",value:i,onChange:s=>h(s.target.value),required:!0})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(F,{id:"rememberMe",checked:o,onCheckedChange:s=>j(s===!0)}),e.jsx(c,{htmlFor:"rememberMe",className:"text-sm font-normal cursor-pointer",children:"Rester connecté"})]}),e.jsx(x,{to:"/forgot-password",className:"text-sm text-muted-foreground hover:text-primary",children:"Mot de passe oublié ?"})]}),e.jsx(C,{type:"submit",variant:"hero",className:"w-full",disabled:l,children:l?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"w-4 h-4 mr-2 animate-spin"}),"Connexion..."]}):"Se connecter"})]}),e.jsxs("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:["Pas encore abonné ?"," ",e.jsx(x,{to:"/subscribe",className:"text-primary hover:underline font-medium",children:"Découvrir Magma"})]})]})]})})};export{q as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.