PageSourceSearch

https://propertymeasure.ai/assets/AccountPanel-D90gCWuP.js

js propertymeasure.ai collected 2026-10-05 13:47:13 UTC 3,444 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-motion-0RUSUsFi.js";import{a as i,L as p}from"./vendor-router-BySvYurK.js";import{P as f,C as m,F as g,f as y}from"./panelUi-17B_VtAk.js";import{r}from"./index-CyDkdwrf.js";import"./useUnsaved-Dh0hegwk.js";import"./alert-circle-CdJRBqmt.js";import"./vendor-firebase-JEFnLeA1.js";function E(){const[a,c]=i.useState(null),[u,b]=i.useState(!0),[l,o]=i.useState(!1),[d,t]=i.useState(null);i.useEffect(()=>{const s=r.auth().onAuthStateChanged(n=>{c(n?{email:n.email,emailVerified:n.emailVerified}:null),b(!1)});return()=>s()},[]);async function h(){const s=a?.email;if(s){o(!0),t(null);try{await r.auth().sendPasswordResetEmail(s),t({tone:"ok",text:`Sent. Check ${s} for the link.`})}catch(n){t({tone:"bad",text:n?.message||"Could not send that email."})}finally{o(!1)}}}async function x(){o(!0),t(null);try{await r.auth().currentUser?.sendEmailVerification(),t({tone:"ok",text:"Verification email sent."})}catch(s){t({tone:"bad",text:s?.message||"Could not send that email."})}finally{o(!1)}}return e.jsxs(f,{loading:u,children:[d&&e.jsx("p",{className:`mb-3 rounded-lg border px-3.5 py-2.5 text-12 font-medium ${d.tone==="ok"?"border-emerald-200 bg-emerald-50 text-[#166B3B]":"border-rose-200 bg-rose-50 text-rose-700"}`,children:d.text}),e.jsxs(m,{title:"Sign-in",children:[e.jsx(g,{label:"Email",htmlFor:"a-email",hint:"This is how you sign in. Changing it needs support, because it is also the key every record on this account hangs from.",children:e.jsx("input",{id:"a-email",className:y,value:a?.email??"",readOnly:!0,disabled:!0})}),a&&!a.emailVerified&&e.jsxs("div",{className:"mt-3 flex flex-wrap items-center justify-between gap-3 rounded-lg border border-amber-200 bg-amber-50 px-3.5 py-2.5",children:[e.jsx("p",{className:"text-12 text-amber-800",children:"This address is not verified yet."}),e.jsx("button",{onClick:x,disabled:l,className:"rounded-lg border border-amber-300 bg-raised px-2.5 py-1.5 text-12 font-semibold text-amber-800 hover:bg-amber-100 disabled:opacity-40",children:"Send it again"})]})]}),e.jsx(m,{title:"Password",hint:"Changed by email, not in this form — so a password cannot be reset by somebody who walks up to an unlocked screen.",children:e.jsx("button",{onClick:h,disabled:l||!a?.email,className:"rounded-lg border border-line bg-raised px-3.5 py-2 text-sm font-semibold text-ink transition-colors hover:border-line hover:bg-sunk disabled:opacity-40",children:l?"Sending…":"Email me a reset link"})}),e.jsxs(m,{title:"Signing out",hint:"Sign out here, or from the menu behind your avatar.",children:[e.jsx("div",{className:"flex flex-wrap gap-2",children:e.jsx("button",{onClick:async()=>{try{await r.auth().signOut()}catch{t({tone:"bad",text:"Could not sign you out. You are still signed in — close this browser to be safe."})}},className:"rounded-lg border border-line bg-raised px-3.5 py-2 text-sm font-semibold text-ink hover:bg-sunk",children:"Sign out"})}),e.jsx("p",{className:"mt-3 text-12 leading-relaxed text-ink-muted",children:"Lost a phone or a laptop? Change your password using the button above — that ends every other session as well, which signing out on this device alone does not do."})]}),e.jsxs("p",{className:"text-12 text-ink-muted",children:["Your name, company and contact details are on"," ",e.jsx(p,{to:"/settings?s=company",className:"font-semibold text-brand-ink hover:underline",children:"Company profile"}),"."]})]})}export{E 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.