PageSourceSearch

https://eisenhowertodoist.netlify.app/assets/ApiKeyManager-VatIB6Wy.js

js eisenhowertodoist.netlify.app collected 2026-10-03 10:41:42 UTC 5,360 bytes, 3 lines download raw bytes

1import{c as x,j as e,bF as g,aq as y,bH as b,bO as v,M as j}from"./vendor-1kUQ7zn2.js";import{g as w,at as N,w as k,au as E,av as O,aw as S,B as C,ax as M,u as T,ak as _,s as h}from"./index--kdl1ae9.js";import{u as L,m as c}from"./vendor-motion-BX-jsy7E.js";import{d as A}from"./vendor-supabase-Dh2gyaRa.js";import"./vendor-date-en1IyhsK.js";const B=["Organize tasks using the Eisenhower Matrix","Boost your productivity with smart prioritization","Track your progress with detailed analytics","Seamlessly sync across all your devices"],f="(max-height: 500px)",R=s=>{if(typeof window>"u"||!("matchMedia"in window))return()=>{};const t=window.matchMedia(f);return t.addEventListener("change",s),()=>t.removeEventListener("change",s)},W=()=>typeof window<"u"&&"matchMedia"in window&&window.matchMedia(f).matches,Y=({onSuccess:s,onLogout:t,firstName:r})=>{const a=w(),n=x.useSyncExternalStore(R,W,()=>!1),u=L(),o=(l,m={})=>u?{initial:!1,animate:{opacity:1},transition:{duration:0}}:{initial:{opacity:0,...m},animate:{opacity:1,...Object.fromEntries(Object.keys(m).map(p=>[p,p==="scale"?1:0]))},transition:{duration:.5,delay:l}},[i]=x.useState(N);x.useEffect(()=>{k("connect_todoist_viewed",{layout:E()})},[]),x.useEffect(()=>{i&&O()},[i]);const d=e.jsx("div",{className:n?"":"pt-4",children:e.jsx(M,{onSuccess:s})});return e.jsx("div",{className:a?"mx-gate":"flex flex-col items-center justify-center min-h-[80vh] px-4",children:e.jsxs(c.div,{...o(0,{y:20}),className:a?n?"mx-gate-inner space-y-4":"mx-gate-inner space-y-6":"w-full max-w-md 
1space-y-8",children:[e.jsxs("div",{className:"text-center space-y-2",children:[e.jsx(c.h1,{...o(.2,{scale:.9}),className:a?"text-[28px] leading-9 font-bold tracking-tight text-foreground":"text-4xl font-bold tracking-tight text-foreground",children:"Connect Todoist"}),e.jsx(c.p,{...o(.3),className:a?"text-[17px] text-muted-foreground":"text-xl text-muted-foreground",children:r?`Welcome, ${r}. One last step.`:"Welcome. One last step."})]}),i&&e.jsxs("p",{role:"status","data-testid":"connect-notice",className:"flex items-start gap-2 rounded-lg border bg-muted/40 px-3 py-2 text-sm text-muted-foreground",children:[e.jsx(g,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":!0}),e.jsx("span",{children:S(i)})]}),n&&d,e.jsx(c.div,{...o(.4,{y:20}),className:a?"bg-card rounded-2xl p-5 shadow-sm border":"bg-card rounded-2xl p-8 shadow-sm border",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("h2",{className:a?"text-xl font-semibold text-foreground/90":"text-2xl font-semibold text-foreground/90",children:"Connect your Todoist account to:"}),e.jsx("ul",{className:n?"grid grid-cols-2 gap-3":"space-y-3",children:B.map((l,m)=>e.jsxs(c.li,{...u?{initial:!1,animate:{opacity:1},transition:{duration:0}}:{initial:{opacity:0,x:-20},animate:{opacity:1,x:0},transition:{duration:.5,delay:m*.1+.5,ease:[.23,1,.32,1]}},className:`flex items-center space-x-3 text-muted-foreground group
2                              hover:text-foreground transition-colors duration-200`,children:[e.jsx("div",{className:"p-1 rounded-full bg-primary/10",children:e.jsx(y,{className:"h-4 w-4 text-primary"})}),e.jsx("span",{children:l})]},l))})]}),!n&&e.jsx(c.div,{...o(.9,{y:10}),children:d}),e.jsxs(c.div,{...o(1,{y:10}),className:`mt-6 p-4 bg-blue-50/50 dark:bg-blue-950/20 border border-blue-100 dark:border-blue-900/50
3                       rounded-lg flex items-start space-x-3 text-sm text-blue-800 dark:text-blue-200`,children:[e.jsx(b,{className:"w-6 h-6 text-blue-600 dark:text-blue-400 flex-shrink-0 mt-1"}),e.jsxs("div",{children:[e.jsx("h3",{className:"font-semibold mb-1",children:"Your privacy matters"}),e.jsx("p",{className:"text-xs",children:"We take your data privacy seriously. We only access task-related information necessary for prioritization. Your personal data is never shared or sold."})]})]})]})}),e.jsx(c.div,{...o(1.1),className:"text-center",children:e.jsxs(C,{variant:"ghost",onClick:t,className:a?"h-11 text-muted-foreground hover:text-muted-foreground transition-colors duration-200":"text-muted-foreground/70 hover:text-muted-foreground transition-colors duration-200",children:[e.jsx(v,{className:"mr-2 h-4 w-4"}),"Log out"]})})]})})},z=s=>{if(typeof s!="string")return null;const t=s.trim().split(/\s+/)[0]??"";return!t||t.includes("@")||/[\d_+]/.test(t)?null:t.charAt(0).toUpperCase()+t.slice(1)},F=(s,...t)=>{const r=s??{};for(const a of[r.given_name,r.first_name,r.full_name,r.name,...t]){const n=z(a);if(n)return n}return null},P=({onApiKeySubmit:s})=>{const{toast:t}=T(),r=j(),{session:a}=A.useSessionContext(),n=async o=>{try{const{data:{user:i},error:d}=await h.auth.getUser();if(d)throw d;if(!i)throw new Error("No user found");const{error:l}=await h.from("profiles").update({todoist_access_token:o}).eq("id",i.id);if(l)throw l;s(o),t({title:"Todoist connected",description:"Your tasks are syncing."}),r("/matrix",{replace:!0})}catch(i){const d=i?.message||"Failed to save Todoist connection";t({title:"Couldn't connect Todoist",description:d,variant:"destructive"})}},u=async()=>{try{await _(),await h.auth.signOut(),t({title:"Logged out"}),r("/")}catch{t({title:"Couldn't log out",description:"Please try again.",variant:"destructive"})}};return e.jsx(Y,{onSuccess:n,onLogout:u,firstName:F(a?.user?.user_metadata)})};export{P 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.