PageSourceSearch

https://vwpl.pl/assets/ResetPassword-CN8hJ3tp.js

js vwpl.pl collected 2026-10-08 07:35:36 UTC 3,165 bytes, 6 lines download raw bytes

1import{j as e}from"./ui-CDa3migz.js";import{r as a,u as g}from"./vendor-lfZNxkbU.js";import{d as w,u as v,s as n,H as b,a as N,I as m,B as y,F as k}from"./index-Ca5Bl_uW.js";import{L as h}from"./label-DM5OMYaH.js";/**
2 * @license lucide-react v0.462.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const z=w("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]),C=()=>{const[r,x]=a.useState(""),[i,f]=a.useState(""),[d,c]=a.useState(!1),[l,u]=a.useState(!1),p=g(),{toast:o}=v();a.useEffect(()=>{const{data:{subscription:s}}=n.auth.onAuthStateChange(t=>{(t==="PASSWORD_RECOVERY"||t==="SIGNED_IN")&&u(!0)});return n.auth.getSession().then(({data:{session:t}})=>{t&&u(!0)}),()=>s.unsubscribe()},[]);const j=async s=>{if(s.preventDefault(),r.length<6){o({title:"Błąd",description:"Hasło musi mieć minimum 6 znaków",variant:"destructive"});return}if(r!==i){o({title:"Błąd",description:"Hasła nie są takie same",variant:"destructive"});return}c(!0);const{error:t}=await n.auth.updateUser({password:r});c(!1),t?o({title:"Błąd",description:t.message,variant:"destructive"}):(o({title:"Hasło zmienione",description:"Możesz teraz korzystać z nowego hasła."}),p("/moje-konto",{replace:!0}))};return e.jsxs("div",{className:"min-h-screen flex flex-col",children:[e.jsxs(b,{children:[e.jsx("title",{children:"Resetuj hasło | VWP"}),e.jsx("meta",{name:"robots",content:"noindex, follow"})]}),e.jsx(N,{}),e.jsx("main",{className:"flex-1 py-12 bg-muted",children:e.jsx("div",{className:"container mx-auto px-4",children:e.jsx("div",{className:"max-w-md mx-auto",children:e.jsxs("div",{className:"bg-background p-8 border border-border shadow-sm",children:[e.jsx("div",{className:"flex justify-center mb-6",children:e.jsx("div",{className:"w-16 h-16 bg-vwp-dark rounded-full flex items-center justify-center",children:e.jsx(z,{className:"w-8 h-8 text-white"})})}),e.jsx("h1",{className:"font-heading text-2xl font-bold text-center mb-2 text-foreground",children:"Ustaw nowe hasło"}),e.jsx("p",{className:"text-center text-muted-foreground text-sm mb-8",children:l?"Wpisz nowe hasło do swojego konta":"Weryfikacja linku resetującego..."}),l&&e.jsxs("form",{onSubmit:j,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(h,{htmlFor:"password",children:"Nowe hasło *"}),e.jsx(m,{id:"password",type:"password",value:r,onChange:s=>x(s.target.value),className:"mt-1",placeholder:"••••••••"})]}),e.jsxs("div",{children:[e.jsx(h,{htmlFor:"confirm",children:"Powtórz hasło *"}),e.jsx(m,{id:"confirm",type:"password",value:i,onChange:s=>f(s.target.value),className:"mt-1",placeholder:"••••••••"})]}),e.jsx(y,{type:"submit",className:"w-full font-heading bg-vwp-dark hover:bg-vwp-dark/90",size:"lg",disabled:d,children:d?"Proszę czekać...":"ZMIEŃ HASŁO"})]})]})})})}),e.jsx(k,{})]})};export{C 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.