PageSourceSearch

https://repsshield.com/assets/mobile-sync-settings-B6XkM7dm.js

js repsshield.com collected 2026-09-24 14:18:37 UTC 3,184 bytes, 1 lines download raw bytes

1import{aK as F,j as e,aL as W,E as X,G as Y,I,aB as Z,f as S,as as c,J as B,m as L,aN as _}from"./index-Byg2HWAE.js";import{u as $,r as ee,R as ae}from"./vendor-Qgthw7N1.js";import{M as o,a as ne}from"./MobileImapConnectSheet-C6JGrTGV.js";import{u as oe}from"./useIntegrations-CUanp7GW.js";import"./calendarService-CrpjTGeC.js";function de(){var m,u,g,x,p,C,h,j,M,b,f,N,v,w,y,k;const[,G]=$(),D=F(),[R,i]=ee.useState(!1),{googleCalendarStatusQuery:t,imapStatusQuery:a,microsoftCalendarStatusQuery:l,microsoftMailStatusQuery:n,handleGoogleCalendarConnect:O,handleMicrosoftCalendarConnect:T,handleMicrosoftMailConnect:Q,disconnectGoogleCalendarMutation:A,disconnectMicrosoftCalendarMutation:E,disconnectMicrosoftMailMutation:P,disconnectImapMutation:d,isGoogleCalendarConnecting:V,isMicrosoftCalendarConnecting:H,isMicrosoftMailConnecting:J,isImapConnecting:K}=oe(),s=((m=a.data)==null?void 0:m.accounts)??[],r=(u=s[0])==null?void 0:u.id,U=!!((g=t.data)!=null&&g.connected||(x=a.data)!=null&&x.connected),q=!!((p=n.data)!=null&&p.connected||(C=l.data)!=null&&C.connected),z=()=>{G("/dashboard"),_("/dashboard")};return D?e.jsx("div",{className:"min-h-screen bg-gray-50 px-4 pt-2 dark:bg-background",children:e.jsxs("div",{className:"mx-auto flex w-full max-w-3xl flex-col gap-3",children:[e.jsx(W,{title:"Sync Settings",subtitle:"Manage mail and calendar connections",onBack:z}),e.jsxs(X,{defaultValue:"google",className:"space-y-4",children:[e.jsx("div",{className:"overflow-x-auto pb-1",children:e.jsxs(Y,{className:"inline-flex min-w-max rounded-2xl bg-muted p-1",children:[e.jsxs(I,{value:"google",className:"min-h-11 gap-2 rounded-xl",children:[e.jsx(Z,{className:"h-4 w-4"}),"Google",U&&e.jsx(S,{className:"h-3 w-3 text-primary"})]}),e.jsxs(I,{value:"outlook",className:"min-h-11 gap-2 rounded-xl",children:[e.jsx(c,{className:"h-4 w-4"}),"Outlook",q&&e.jsx(S,{className:"h-3 w-3 text-primary"})]})]})}),e.jsxs(B,{value:"google",className:"space-y-3",children:[e.jsx(o,{icon:e.jsx(L,{className:"h-5 w-5"}),providerName:"Google Calendar",isConnected:!!((h=t.data)!=null&&h.connected),connectedLabel:((j=t.data)==null?void 0:j.email)??void 0,isConnecting:V,onConnect:O,onDisconnect:()=>A.mutate()}),e.jsx(o,{icon:e.jsx(c,{className:"h-5 w-5"}),providerName:"Gmail IMAP",isConnected:!!((M=a.data)!=null&&M.connected),isConnecting:K||d.isPending,connectedLabel:((b=s[0])==null?void 0:b.email)??((f=s[0])==null?void 0:f.username),credentialValid:((N=a.data)==null?void 0:N.credentialValid)??!0,onConnect:()=>i(!0),onDisconnect:r==null?void 0:()=>d.mutate(r)})]}),e.jsxs(B,{value:"outlook",className:"space-y-3",children:[e.jsx(o,{icon:e.jsx(L,{className:"h-5 w-5"}),providerName:"Outlook Calendar",isConnected:!!((v=l.data)!=null&&v.connected),connectedLabel:((w=n.data)==null?void 0:w.email)??void 0,isConnecting:H,onConnect:T,onDisconnect:()=>E.mutate()}),e.jsx(o,{icon:e.jsx(c,{className:"h-5 w-5"}),providerName:"Outlook Mail",isConnected:!!((y=n.data)!=null&&y.connected),connectedLabel:((k=n.data)==null?void 0:k.email)??void 0,isConnecting:J,onConnect:Q,onDisconnect:()=>P.mutate()})]})]}),e.jsx(ne,{open:R,onOpenChange:i})]})}):e.jsx(ae,{to:"/settings"})}export{de 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.