PageSourceSearch

https://bsquared.ai/assets/connect-tools-DJJRGJwq.js

js bsquared.ai collected 2026-10-05 15:20:12 UTC 3,414 bytes, 1 lines download raw bytes

1import{u as f,j as e,U as j,af as p,C as d,m,s as y,B as r,L as v,ad as N,F as b,G as C}from"./index-DhwrhnZy.js";import{C as w}from"./circle-check-CycdxmpM.js";import{P as G}from"./plug-G6JVmXPz.js";import{F as k}from"./folder-open-CDXk4-r7.js";const L=[{group:"gmail",name:"Gmail",blurb:"Gary reads and sends email on your behalf — briefings, follow-ups, drafts.",icon:N},{group:"calendar",name:"Google Calendar",blurb:"Today's schedule, new events, meeting prep.",icon:b},{group:"drive",name:"Google Drive",blurb:"Find and read files when you ask for them.",icon:k}];function B(){const t=new URLSearchParams(window.location.search),a=t.get("connected"),o=t.get("connect_error"),{data:s,isLoading:x}=f({queryKey:["/api/auth/connections"],queryFn:async()=>(await C("GET","/api/auth/connections")).json()}),c=n=>{window.location.href=`/api/auth/google/connect?scope=${n}&return=/account/connect-tools`};return e.jsx(j,{children:e.jsxs("div",{className:"max-w-3xl mx-auto p-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-semibold",children:"Connect your tools"}),e.jsx("p",{className:"text-muted-foreground mt-1",children:"Gary only gets access you grant here, one tool at a time. You can revoke any grant from your Google account settings."})]}),a&&e.jsxs("div",{className:"rounded-md border border-green-300 bg-green-50 dark:bg-green-950/30 px-4 py-3 text-sm",children:[e.jsx(w,{className:"inline h-4 w-4 mr-2 text-green-600"}),a==="gmail"?"Gmail":a==="calendar"?"Google Calendar":"Google Drive"," connected."]}),o&&e.jsxs("div",{className:"rounded-md border border-red-300 bg-red-50 dark:bg-red-950/30 px-4 py-3 text-sm",children:["That connection didn't finish (",o,"). Try again — nothing was changed."]}),x?e.jsx("div",{className:"flex justify-center py-10",children:e.jsx(p,{className:"h-6 w-6 animate-spin"})}):e.jsxs("div",{className:"space-y-3",children:[L.map(({group:n,name:u,blurb:g,icon:h})=>{var l;const i=(s==null?void 0:s.google.groups[n])??!1;return e.jsx(d,{children:e.jsxs(m,{className:"flex items-center justify-between py-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(h,{className:"h-5 w-5 mt-1 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:u}),e.jsx("div",{className:"text-sm text-muted-foreground",children:g}),i&&((l=s==null?void 0:s.google.accounts[0])==null?void 0:l.email)&&e.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:["as ",s.google.accounts[0].email]})]})]}),i?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{variant:"outline",className:"text-green-600 border-green-300",children:"Connected"}),e.jsx(r,{variant:"ghost",size:"sm",onClick:()=>c(n),children:"Reconnect"})]}):e.jsx(r,{onClick:()=>c(n),children:"Connect"})]})},n)}),e.jsx(d,{children:e.jsxs(m,{className:"flex items-center justify-between py-4",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(G,{className:"h-5 w-5 mt-1 text-muted-foreground"}),e.jsxs("div",{children:[e.jsx("div",{className:"font-medium",children:"CRM & other apps"}),e.jsx("div",{className:"text-sm text-muted-foreground",children:"Salesforce, HubSpot, Follow Up Boss and more connect from the Integrations page."})]})]}),e.jsx(v,{href:"/integrations",children:e.jsx(r,{variant:"outline",children:"Open Integrations"})})]})})]})]})})}export{B 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.