PageSourceSearch

https://leaguelogs.com/assets/Account-CQ-QyPS7.js

js leaguelogs.com collected 2026-10-02 01:35:32 UTC 9,587 bytes, 1 lines download raw bytes

1import{r,j as e}from"./auth-DsVcSKZ9.js";import{u as R,A as F,b as I,M as a,K as d,w as D}from"./main-CmoY06Gm.js";import"./return-DT4MUmgu.js";function $(){const{session:l,logout:c}=R(),{leagues:s}=F(),n=I(),[x,b]=r.useState(!1),[L,g]=r.useState(!1),[m,y]=r.useState(""),[p,v]=r.useState(!1),[j,N]=r.useState(null),[i,w]=r.useState({episodes:!0,briefing:!0,live:!0}),[u,k]=r.useState(null),f=async t=>{const S={...i,[t]:!i[t]};w(S),k(t);try{await D.updateNotificationPrefs(S)}catch{w(i)}finally{k(null)}},o=l==null?void 0:l.user,E=(o==null?void 0:o.displayName)??"User",C=(o==null?void 0:o.email)??"",T=E.charAt(0).toUpperCase(),A=async()=>{window.confirm("Sign out of LeagueLogs?")&&(await c(),n("/"))},_=()=>{if(!x){window.confirm("Are you sure you want to delete your account?")&&b(!0);return}g(!0)},P=async()=>{if(!(m!=="DELETE"||p)){v(!0),N(null);try{await D.deleteAccount(),await c(),n("/")}catch(t){N((t==null?void 0:t.message)??"Account deletion failed"),v(!1)}}};return e.jsxs("div",{className:"max-w-2xl mx-auto px-5 md:px-6 py-8 md:py-12 space-y-10",children:[e.jsxs("div",{className:"flex items-center gap-5",children:[e.jsx("div",{className:"relative shrink-0",children:e.jsx("div",{className:"w-16 h-16 rounded-full bg-primary-fixed/15 border border-primary-fixed/30 flex items-center justify-center",children:e.jsx("span",{className:"font-display italic text-[28px] text-bone leading-none",children:T})})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("h1",{className:"font-display text-[1.8rem] leading-[1.05] tracking-[-0.02em] text-bone truncate",children:E}),e.jsx(a,{className:"text-[11px] tracking-[0.22em] uppercase text-on-surface-variant/80 mt-1 block truncate",children:C})]})]}),e.jsxs("section",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-baseline justify-between gap-3 border-b border-white/10 pb-2",children:[e.jsx(d,{className:"text-primary-fixed/80",children:"Connected Leagues"}),e.jsxs(a,{className:"text-[10px] tracking-[0.22em] uppercase text-on-surface-variant/60",children:[s.length," of 10"]})]}),s.length===0?e.jsx("p",{className:"font-ui text-sm text-on-surface-variant py-4",children:"No leagues connected yet."}):e.jsx("div",{className:"space-y-2",children:s.map(t=>e.jsxs("div",{className:"w-full flex items-center gap-3 px-4 py-3 rounded-md bg-surface-container-low border border-white/5",children:[e.jsx("div",{className:"w-9 h-9 rounded-md bg-primary-fixed/10 border border-primary-fixed/15 flex items-center justify-center shrink-0",children:e.jsx("span",{className:"font-display italic text-[14px] text-primary-fixed",children:t.name.charAt(0)})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-display italic text-[15px] text-bone truncate",children:t.name}),e.jsxs(a,{className:"text-[10px] tracking-[0.22em] uppercase text-on-surface-variant/70 mt-0.5 block",children:[t.season," · ",t.totalRosters," teams"]})]}),t.tier!=="FREE"&&e.jsx(a,{className:"text-[9px] tracking-[0.24em] uppercase text-primary-fixed bg-primary-fixed/10 border border-primary-fixed/25 px-2 py-0.5 rounded-full shrink-0",children:"Pro"})]},t.leagueId))}),e.jsxs("button",{onClick:()=>n("/onboarding/connect"),disabled:s.length>=10,className:"w-full flex items-center justify-center gap-2 border border-white/15 text-bone font-ui font-semibold text-[13.5px] px-5 py-2.5 rounded-full hover:bg-white/5 transition-colors disabled:opacity-40 disabled:cursor-not-allowed",children:[e.jsx("span",{className:"material-symbols-outlined text-[18px]",children:"add"}),"Add more leagues"]})]}),e.jsxs("section",{className:"space-y-4",children:[e.jsx("div",{className:"border-b border-white/10 pb-2",children:e.jsx(d,{className:"text-primary-fixed/80",children:"Subscription"})}),e.jsxs("button",{onClick:()=>n("/app/subscription"),className:"w-full flex items-center justify-between px-5 py-4 rounded-md bg-surface-container-low border border-white/5 hover:border-primary-fixed/30 hover:bg-primary-fixed/[0.04] transition-colors text-left group",children:[e.jsxs("div",{className:"flex items-center gap-4 min-w-0",children:[e.jsx("span",{className:"material-symbols-outlined text-primary-fixed text-[22px]",children:"workspace_premium"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"font-display italic text-[16px] text-bone leading-tight",children:"Manage subscription"}),e.jsx(a,{className:"text-[10px] tracking-[0.22em] uppercase text-on-surface-variant/70 mt-0.5 block",children:"Contender · billing · Hero opt-in"})]})]}),e.jsx("span",{className:"material-symbols-outlined text-on-surface-variant text-[18px] group-hover:translate-x-0.5 transition-transform",children:"chevron_right"})]})]}),e.jsxs("section",{className:"space-y-4",children:[e.jsx("div",{className:"border-b border-white/10 pb-2",children:e.jsx(d,{className:"text-primary-fixed/80",children:"Notifications"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(h,{label:"Newsletter editions",description:"Tuesday Recap · Thursday Preview · Sunday Briefing",checked:i.briefing,saving:u==="briefing",onToggle:()=>f("briefing")}),e.jsx(h,{label:"Podcast episodes",description:"Weekly LeagueLogs Show drops (when shipped)",checked:i.episodes,saving:u==="episodes",onToggle:()=>f("episodes")}),e.jsx(h,{label:"Live & in-game alerts",description:"Trade analyses, scout notes, hero unlocks",checked:i.live,saving:u==="live",onToggle:()=>f("live")})]})]}),e.jsxs("section",{className:"space-y-4",children:[e.jsx("div",{className:"border-b border-white/10 pb-2",children:e.jsx(d,{className:"text-primary-fixed/80",children:"Legal"})}),e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsxs("a",{href:"/terms",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-4 py-3 rounded-md hover:bg-white/[0.03] transition font-ui text-[14px] text-on-surface-variant hover:text-bone",children:["Terms of Service",e.jsx("span",{className:"material-symbols-outlined text-[16px] text-on-surface-variant/60",children:"open_in_new"})]}),e.jsxs("a",{href:"/privacy",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-4 py-3 rounded-md hover:bg-white/[0.03] transition font-ui text-[14px] text-on-surface-variant hover:text-bone",children:["Privacy Policy",e.
1jsx("span",{className:"material-symbols-outlined text-[16px] text-on-surface-variant/60",children:"open_in_new"})]}),e.jsxs("a",{href:"/acceptable-use",target:"_blank",rel:"noopener noreferrer",className:"flex items-center justify-between px-4 py-3 rounded-md hover:bg-white/[0.03] transition font-ui text-[14px] text-on-surface-variant hover:text-bone",children:["Acceptable Use",e.jsx("span",{className:"material-symbols-outlined text-[16px] text-on-surface-variant/60",children:"open_in_new"})]})]})]}),e.jsx("div",{className:"pt-4 border-t border-white/10",children:e.jsx("button",{onClick:A,className:"w-full py-3 rounded-full border border-white/15 text-on-surface-variant text-sm font-ui font-semibold hover:bg-white/5 hover:text-bone transition-colors",children:"Sign out"})}),e.jsx("div",{className:"space-y-3",children:L?e.jsxs("div",{className:"p-5 rounded-md bg-crimson/5 border-l-2 border-crimson space-y-3",children:[e.jsxs("p",{className:"font-ui text-[14px] text-bone font-medium",children:["This cannot be undone. Type ",e.jsx("strong",{children:"DELETE"})," to confirm."]}),e.jsx("input",{type:"text",value:m,onChange:t=>y(t.target.value),placeholder:"Type DELETE",className:"w-full bg-surface-container-low text-bone rounded-md px-4 py-2.5 font-mono text-[13px] border border-crimson/30 focus:outline-none focus:ring-1 focus:ring-crimson/40 placeholder:text-on-surface-variant/40"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>{g(!1),b(!1),y("")},className:"flex-1 py-2.5 rounded-full border border-white/15 text-on-surface-variant text-sm font-ui font-semibold hover:bg-white/5 transition",children:"Cancel"}),e.jsx("button",{onClick:P,disabled:m!=="DELETE"||p,className:"flex-1 py-2.5 rounded-full bg-crimson text-bone text-sm font-ui font-semibold hover:bg-crimson/90 transition disabled:opacity-30 disabled:cursor-not-allowed",children:p?"Deleting…":"Delete account"})]}),j&&e.jsx("p",{className:"font-ui text-[12px] text-crimson",children:j})]}):e.jsx("button",{onClick:_,className:"w-full text-center font-ui text-[13px] text-crimson hover:underline transition py-2",children:"Delete account"})}),e.jsx("div",{className:"pt-6 border-t border-white/10 flex items-center justify-center",children:e.jsx(a,{className:"text-[10px] tracking-[0.24em] uppercase text-on-surface-variant/60",children:"LeagueLogs v1.0"})})]})}function h({label:l,description:c,checked:s,saving:n,onToggle:x}){return e.jsxs("button",{type:"button",onClick:x,disabled:n,className:"w-full flex items-center gap-4 px-4 py-3.5 rounded-md bg-surface-container-low border border-white/5 hover:border-white/15 transition-colors text-left disabled:opacity-70",children:[e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"font-ui text-[14px] text-bone font-medium leading-tight",children:l}),e.jsx(a,{className:"block mt-1 text-[10px] tracking-[0.18em] uppercase text-on-surface-variant/70",children:c})]}),e.jsx("div",{className:`relative w-10 h-6 rounded-full transition-colors shrink-0 ${s?"bg-primary-fixed":"bg-white/10"}`,"aria-pressed":s,children:e.jsx("div",{className:`absolute top-0.5 w-5 h-5 rounded-full bg-on-primary-fixed transition-all ${s?"left-[18px] bg-on-primary-fixed":"left-0.5 bg-bone"}`})})]})}export{$ 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.