PageSourceSearch

https://app.backstagebaton.com/app/assets/LoginPage-BgsM7-ct.js

js backstagebaton.com collected 2026-10-07 08:50:46 UTC 4,597 bytes, 1 lines download raw bytes

1import{r as n,e as k,b as a,u as B,j as e,L as v,B as w}from"./index-_aijvlUq.js";import{I as j}from"./Input-ysTyZFq5.js";let m=null;function E(){const[s,r]=n.useState(m),[o,g]=n.useState(!1);n.useEffect(()=>{const i=window.matchMedia?.("(display-mode: standalone)")?.matches||window.navigator.standalone===!0;g(i);const x=l=>{l.preventDefault(),m=l,r(l)},p=()=>{m=null,r(null),g(!0)};return window.addEventListener("beforeinstallprompt",x),window.addEventListener("appinstalled",p),()=>{window.removeEventListener("beforeinstallprompt",x),window.removeEventListener("appinstalled",p)}},[]);const u=n.useCallback(async()=>{if(!s)return!1;try{await s.prompt();const i=await s.userChoice;return m=null,r(null),i?.outcome==="accepted"}catch{return m=null,r(null),!1}},[s]);return{canInstall:!!s&&!o,isStandalone:o,promptInstall:u}}function P(){const[s,r]=n.useState(""),[o,g]=n.useState(""),[u]=k(),i=a(t=>t.login);a(t=>t.pendingOrgs);const x=a(t=>t.selectOrg),p=a(t=>t.isLoading),l=a(t=>t.error),N=a(t=>t.clearError),c=B(),{canInstall:y,promptInstall:S}=E();n.useEffect(()=>{const t=u.get("org");t&&sessionStorage.setItem("bsb_pending_org",t)},[u]);async function I(t){t.preventDefault(),N();const d=await i(s,o);if(d?.verificationRequired)c(`/check-email?email=${encodeURIComponent(d.email)}`,{replace:!0});else if(d==="select-org"){const h=sessionStorage.getItem("bsb_pending_org");if(h){sessionStorage.removeItem("bsb_pending_org");const f=(a.getState().pendingOrgs||[]).find(b=>b.slug===h);if(f&&await x(f.orgId)){c("/",{replace:!0});return}}c("/select-org",{replace:!0})}else d==="force-password-change"?c("/change-password",{replace:!0}):d===!0&&(sessionStorage.removeItem("bsb_pending_org"),c("/",{replace:!0}))}return e.jsxs("div",{className:"min-h-screen flex",children:[e.jsxs("div",{className:"hidden lg:flex lg:w-1/2 relative bg-gradient-to-b from-slate-800 to-slate-900 flex-col items-center justify-center",children:[e.jsx("a",{href:"/",children:e.jsx("img",{src:"/app/brand/logo-primary-light.svg",alt:"Backstage Baton",className:"h-56 w-56 object-contain"})}),e.jsxs("div",{className:"mt-8 text-center px-8",children:[e.jsx("p",{className:"text-2xl font-bold tracking-tight text-white",children:"Your ensemble, organized."}),e.jsx("p",{className:"text-sm text-white/50 mt-2",children:"Backstage Baton"})]})]}),e.jsx("div",{className:"flex-1 flex items-center justify-center bg-gray-50 lg:bg-white px-4",children:e.jsxs("div",{className:"w-full max-w-sm",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx("a",{href:"/",children:e.jsx("img",{src:"/app/brand/logo-primary.svg",alt:"Backstage Baton",className:"h-24 mx-auto mb-4 object-contain"})}),e.jsx("h1",{className:"text-2xl font-bold text-gray-900",children:"Member Portal"}),e.jsx("p",{className:"text-sm text-gray-500 mt-1",children:"Sign in to continue"})]}),e.jsxs("form",{onSubmit:I,className:"bg-white rounded-xl shadow-sm border border-gray-200 p-6 space-y-4 lg:shadow-none lg:border-0 lg:p-0",children:[l&&e.jsx("div",{className:"rounded-md bg-red-50 border border-red-200 px-3 py-2 text-sm text-red-700",children:l}),e.jsx(j,{label:"Email",type:"email",value:s,onChange:t=>r(t.target.value),required:!0,autoComplete:"email",autoFocus:!0}),e.jsx(j,{label:"Password",type:"password",value:o,onChange:t=>g(t.target.value),required:!0,autoComplete:"current-password"}),e.jsx("div",{className:"flex justify-end",children:e.jsx(v,{to:"/forgot-password",className:"text-sm text-band-600 hover:text-band-700 font-medium",children:"Forgot password?"})}),e.jsx(w,{type:"submit",isLoading:p,disabled:!s||!o,className:"w-full",children:"Sign in"}),e.jsxs("p",{className:"text-center text-sm text-gray-500",children:["New to Backstage Baton?"," ",e.jsx(v,{to:"/signup",className:"text-band-600 hover:text-band-700 font-medium",children:"Start free trial"})]})]}),y&&e.jsxs("div",{className:"mt-6 rounded-xl border border-band-200 bg-band-50 px-4 py-3 flex items-center gap-3",children:[e.jsx("svg",{className:"h-5 w-5 text-band-600 shrink-0",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2","aria-hidden":"true",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v12m0 0l-4-4m4 4l4-4M4 20h16"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-sm font-medium text-gray-900",children:"Install Backstage Baton"}),e.jsx("p",{className:"text-xs text-gray-600",children:"Add it to your home screen for one-tap access."})]}),e.jsx(w,{type:"button",size:"sm",variant:"secondary",onClick:S,children:"Install"})]})]})})]})}export{P as LoginPage};

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.