PageSourceSearch

https://gay.pl/assets/Login-Ch7k6dir.js

js gay.pl collected 2026-10-07 07:20:24 UTC 7,119 bytes, 1 lines download raw bytes

1import{u as C,j as e}from"./vendor-data-BnyH3H2J.js";import{u as S,a,L as E}from"./vendor-react-Dov0ElfX.js";import{u as L,Q as c}from"./index-DaefrmzX.js";import"./vendor-supabase-DnveRTE1.js";function D(){const{isAuthenticated:j,logout:w}=L(),[,m]=S(),p=C(),[s,x]=a.useState("login"),[n,g]=a.useState(""),[l,b]=a.useState(""),[f,v]=a.useState(""),[d,i]=a.useState(!1),[h,o]=a.useState(""),[y,u]=a.useState("");a.useEffect(()=>{const{data:{subscription:r}}=c.auth.onAuthStateChange(t=>{t==="SIGNED_IN"&&p.invalidateQueries({queryKey:["/api/auth/user"]})});return()=>r.unsubscribe()},[p,m]);const N=async r=>{r.preventDefault(),o(""),i(!0);const{error:t}=await c.auth.signInWithPassword({email:n,password:l});t?o(t.message==="Invalid login credentials"?"Nieprawidłowy email lub hasło":t.message):(p.invalidateQueries({queryKey:["/api/auth/user"]}),m("/")),i(!1)},k=async r=>{if(r.preventDefault(),o(""),l!==f){o("Hasła się nie zgadzają");return}if(l.length<6){o("Hasło musi mieć minimum 6 znaków");return}i(!0);const{error:t}=await c.auth.signUp({email:n,password:l,options:{emailRedirectTo:window.location.origin+"/me"}});t?o(t.message):u("Sprawdź skrzynkę i potwierdź rejestrację. ⚠️ Jeśli nie ma maila w ciągu minuty, zajrzyj do folderu SPAM / Oferty i oznacz wiadomość jako „nie spam”."),i(!1)},z=async r=>{r.preventDefault(),o(""),i(!0);const{error:t}=await c.auth.resetPasswordForEmail(n,{redirectTo:`${window.location.origin}/reset-password`});t?o(t.message):u("Link do resetowania hasła został wysłany na Twój email."),i(!1)};return e.jsxs("div",{className:"min-h-screen flex flex-col items-center justify-center p-6 bg-black relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-[-20%] left-[-10%] w-[50%] h-[50%] bg-primary/20 blur-[150px] rounded-full pointer-events-none"}),e.jsx("div",{className:"absolute bottom-[-10%] right-[-10%] w-[40%] h-[40%] bg-blue-500/10 blur-[150px] rounded-full pointer-events-none"}
1),e.jsxs("div",{className:"relative z-10 w-full max-w-md space-y-8 text-center",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("h1",{className:"text-5xl font-extrabold tracking-tight text-foreground mb-2",children:["gay",e.jsx("span",{className:"text-primary",children:".pl"})]}),e.jsxs("p",{className:"text-foreground text-lg",children:[s==="login"&&"Dołącz do nas.",s==="register"&&"Utwórz konto i dołącz do nas.",s==="forgot"&&"Resetuj hasło"]})]}),e.jsxs("div",{className:"bg-card border border-border p-8 rounded-3xl shadow-2xl space-y-5 backdrop-blur-xl",children:[j&&e.jsxs("div",{className:"bg-primary/10 border border-primary/30 rounded-xl px-4 py-3 text-sm text-foreground space-y-2",children:[e.jsx("p",{children:"Jesteś już zalogowany."}),e.jsxs("div",{className:"flex gap-2 justify-center",children:[e.jsx("button",{onClick:()=>m("/"),className:"px-4 py-1.5 rounded-lg bg-primary text-primary-foreground font-semibold",children:"Przejdź dalej"}),e.jsx("button",{onClick:()=>w(),className:"px-4 py-1.5 rounded-lg border border-border text-muted-foreground",children:"Wyloguj się"})]})]}),h&&e.jsx("div",{className:"bg-red-500/10 border border-red-500/30 text-red-400 text-sm px-4 py-3 rounded-xl",children:h}),y&&e.jsx("div",{className:"bg-green-500/10 border border-green-500/30 text-green-400 text-sm px-4 py-3 rounded-xl",children:y}),s==="login"&&e.jsxs("form",{onSubmit:N,className:"space-y-4",children:[e.jsx("input",{type:"email",placeholder:"Email",value:n,onChange:r=>g(r.target.value),required:!0,className:"w-full bg-background border border-border rounded-xl px-4 py-3 text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-primary transition-colors"}),e.jsx("input",{type:"password",placeholder:"Hasło",value:l,onChange:r=>b(r.target.value),required:!0,className:"w-full bg-background border border-border rounded-xl px-4 py-3 text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-primary transition-colors"}),e.jsx("button",{type:"submit",disabled:d,className:"w-full bg-primary text-black font-bold text-lg py-4 rounded-xl hover:scale-[1.02] active:scale-[0.98] transition-all shadow-[0_0_20px_rgba(0,255,65,0.3)] disabled:opacity-50 disabled:cursor-not-allowed",children:d?"Logowanie...":"Zaloguj się"}),e.jsx("button",{type:"button",onClick:()=>{x("forgot"),o(""),u("")},className:"text-sm text-muted-foreground hover:text-foreground transition-colors",children:"Zapomniałem hasła"})]}),s==="register"&&e.jsxs("form",{onSubmit:k,className:"space-y-4",children:[e.jsx("input",{type:"email",placeholder:"Email",value:n,onChange:r=>g(r.target.value),required:!0,className:"w-full bg-background border border-border rounded-xl px-4 py-3 text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-primary transition-colors"}),e.jsx("input",{type:"password",placeholder:"Hasło (min. 6 znaków)",value:l,onChange:r=>b(r.target.value),required:!0,className:"w-full bg-background border border-border rounded-xl px-4 py-3 text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-primary transition-colors"}),e.jsx("input",{type:"password",placeholder:"Powtórz hasło",value:f,onChange:r=>v(r.target.value),required:!0,className:"w-full bg-background border border-border rounded-xl px-4 py-3 text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-primary transition-colors"}),e.jsx("button",{type:"submit",disabled:d,className:"w-full bg-primary text-black font-bold text-lg py-4 rounded-xl hover:scale-[1.02] active:scale-[0.98] transition-all shadow-[0_0_20px_rgba(0,255,65,0.3)] disabled:opacity-50 disabled:cursor-not-allowed",children:d?"Rejestracja...":"Zarejestruj się"})]}),s==="forgot"&&e.jsxs("form",{onSubmit:z,className:"space-y-4",children:[e.jsx("input",{type:"email",placeholder:"Email",value:n,onChange:r=>g(r.target.value),required:!0,className:"w-full bg-background border border-border rounded-xl px-4 py-3 text-foreground placeholder:text-muted-foreground focus:outline-none focus:border-primary transition-colors"}),e.jsx("button",{type:"submit",disabled:d,className:"w-full bg-primary text-black font-bold text-lg py-4 rounded-xl hover:scale-[1.02] active:scale-[0.98] transition-all shadow-[0_0_20px_rgba(0,255,65,0.3)] disabled:opacity-50 disabled:cursor-not-allowed",children:d?"Wysyłanie...":"Wyślij link resetowania"})]}),e.jsxs("div",{className:"border-t border-border pt-4 space-y-2",children:[s!=="login"&&e.jsx("button",{onClick:()=>{x("login"),o(""),u("")},className:"w-full text-sm text-muted-foreground hover:text-foreground transition-colors py-2",children:"Mam już konto → Zaloguj się"}),s!=="register"&&e.jsx("button",{onClick:()=>{x("register"),o(""),u("")},className:"w-full text-sm text-muted-foreground hover:text-foreground transition-colors py-2",children:"Nie mam konta → Zarejestruj się"})]}),e.jsxs("div",{className:"text-xs text-muted-foreground",children:["Logując się akceptujesz ",e.jsx(E,{href:"#",className:"underline hover:text-foreground",children:"Regulamin"}),"."]})]})]})]})}export{D 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.