PageSourceSearch

https://app.xlift.ai/assets/NewFollowUnfollowPage--MguVrzE.js

js xlift.ai collected 2026-10-05 13:20:30 UTC 4,216 bytes, 1 lines download raw bytes

1import{as as G,o as n,A as M,al as B,a4 as L,a5 as A,U as m,j as o,C as D,G as h,X as g,$ as R,E as q,D as z,L as P,a0 as W,aa as $,ae as K}from"./index-dE8a1mPK.js";import{A as X}from"./AccountPicker-M2R_QSt1.js";import{a as H,c as E,f as O}from"./draftStorage-BA_l97c0.js";import{u as Q}from"./useDraftAutosave-BRfAYMIp.js";import{I as Y}from"./IconArrowLeft-cAVPTBNq.js";import{I as _}from"./IconDeviceFloppy-DgEyIcAH.js";import{S as J}from"./Select-DebRlW67.js";import{N as V}from"./NumberInput-EbCp_odp.js";import{S as T}from"./Switch-Bm85N10X.js";import"./Checkbox-CVTqs_Fd.js";import"./InputsGroupFieldset-C0syow2C.js";import"./CheckIcon-DkMc45y2.js";import"./OptionsDropdown-wonErrz5.js";const i="campaign:follow-unfollow";function fe(){var I,C;const w=G(),a=n.useMemo(()=>H(i),[]),s=(a==null?void 0:a.value)||{},[l,y]=n.useState(s.name||""),[r,x]=n.useState(s.accountIds||[]),[u,F]=n.useState(s.accountGroup||""),[c,v]=n.useState(s.listId||null),[d,j]=n.useState(s.daysToWait??5),[f,b]=n.useState(s.unfollowEnabled!==void 0?s.unfollowEnabled:!0),[p,S]=n.useState(!!s.approvalMode);Q(i,{name:l,accountIds:r,accountGroup:u,listId:c,daysToWait:d,unfollowEnabled:f,approvalMode:p},{isEmpty:e=>!e.name.trim()&&!e.accountIds.length&&!e.listId&&!e.approvalMode});const{data:t}=M({queryKey:["lists"],queryFn:()=>m.listLists()}),k=B({mutationFn:async()=>{const e=await m.createCampaign({type:"follow-unfollow",name:l,accountIds:r,accountGroup:u,approvalMode:p,config:{listId:c,daysToWait:d,unfollowEnabled:f}}),U=await m.startCampaign(e.id);return{id:e.id,...U}},onSuccess:e=>{A(`Follow campaign running — ${e.scheduled||0} follow${e.scheduled===1?"":"s"} queued.`),E(i),w("/campaigns")},onError:e=>L(e)}),N=l.trim()&&r.length>0&&c;return o.jsxs(D,{gap:"md",children:[o.jsxs(h,{children:[o.jsx(g,{variant:"subtle",leftSection:o.jsx(Y,{size:14}),onClick:()=>w("/campaigns"),children:"Back"}),o.jsx(R,{order:2,children:"New Follow / Unfollow campaign"}),(a==null?void 0:a.ts)&&o.jsxs(q,{color:"blue",variant:"light",leftSection:o.jsx(_,{size:12}),children:["Resumed from ",O(a.ts)]})]}),o.jsx(z,{withBorder:!0,p:"lg",children:o.jsxs(D,{gap:"md",children:[o.jsx(P,{label:"Campaign name",placeholder:"Shopify founders — follow round 1",value:l,onChange:e=>y(e.currentTarget.value)}),o.jsx(X,{label:"Accounts to follow from",description:"Round-robins across the selection. Browser-mode accounts run it through the extension, so keep an X tab open.",filter:e=>e.status==="active",value:r,group:u,onGroupChange:F,onChange:x,mode:"multi"}),o.jsx(J,{label:"Source list",description:"The list of @handles to follow. Use the Leads page to scrape one if you don't have it yet.",placeholder:(I=t==null?void 0:t.lists)!=null&&I.length?"Pick a list":"No lists yet — create one first",value:c,onChange:v,data:((t==null?void 0:t.lists)||[]).map(e=>({value:e.id,label:e.name})),disabled:!((C=t==null?void 0:t.lists)!=null&&C.length)}),o.jsxs(h,{grow:!0,children:[o.jsx(V,{label:"Days to wait before unfollowing",description:"If they haven't followed back by then, queue an unfollow.",value:d,onChange:e=>j(Number(e)||5),min:1,max:60}),o.jsx(T,{label:"Unfollow non-followers",description:"Off = follow-only campaign (no unfollow leg).",checked:f,onChange:e=>b(e.currentTarget.checked),mt:"xl"})]}),o.jsx(T,{label:"Approval mode",description:"If on, every follow waits for manual approval. Unfollows still auto-execute.",checked:p,onChange:e=>S(e.currentTarget.checked)}),o.jsx(W,{color:"orange",icon:o.jsx($,{size:16}),variant:"light",children:`Follow/unfollow at scale is high-risk for the account. Daily caps (default 30 follows/day) and working hours apply automatically. v1 doesn't yet enforce "never re-follow within 90 days" or "skip accounts you follow organically" — review the History page during the first day and pause if anything looks off.`}),o.jsxs(h,{justify:"flex-end",gap:"xs",children:[(a==null?void 0:a.ts)&&o.jsx(g,{variant:"subtle",color:"gray",onClick:()=>{E(i),y(""),x([]),v(null),j(5),b(!0),S(!1),A("Draft discarded")},children:"Discard draft"}),o.jsx(g,{leftSection:o.jsx(K,{size:16}),onClick:()=>k.mutate(),disabled:!N,loading:k.isPending,children:"Create & start"})]})]})})]})}export{fe 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.