PageSourceSearch

https://dashboard.store.link/assets/index-846b21d2.js

js store.link collected 2026-09-24 11:14:06 UTC 8,688 bytes, 1 lines download raw bytes

1import{r as D,j as a}from"./framer-motion-46115193.js";import{b as Y,E,F as R}from"./index-19fa935d.js";import{b7 as N,b8 as H,j as t,S as A,T as l,b9 as _,ba as $,bb as S,bc as B,f as h,ao as q,q as O,P as G,t as Q,v as X,w as F,x,y as J,z as W,a as K,bd as V,aP as Z,be as nn,a5 as an,B as p,p as ln,d as en,e as I}from"./App-5a95c519.js";import{C as dn}from"./index-3ffe96a9.js";import{C as z}from"./Card-ca893fd7.js";import{C as L}from"./CardContent-05bbc1e6.js";function on(){const s=dn.isNativePlatform(),{data:e}=N(),{manageSubscriptions:P,billingAlertContextHolder:k,loading:o}=H(),[w,g]=D.useState(!1),T=Y(),c=n=>{T(E(n)),T(R("billing"))};return a.jsxs(D.Fragment,{children:[k,a.jsx(t,{marginX:4,pt:{xs:2,lg:4},mb:4,children:a.jsxs(t,{maxWidth:{xs:"100%",md:800},children:[a.jsxs(A,{direction:{xs:"column",sm:"row"},justifyContent:"space-between",alignItems:{xs:"flex-start",sm:"center"},spacing:2,flexWrap:"wrap",children:[a.jsxs(t,{children:[a.jsx(l,{variant:"h5",children:s?"Account":"Billing"}),a.jsx(l,{variant:"body2",color:"text.secondary",children:`${s?"Manage your account, ":""}Change your plan, view invoices and update billing info.`})]}),a.jsx(_,{endIcon:a.jsx($,{}),onClick:()=>P(),disabled:!!o&&o!=="managepayments",loading:o==="managepayments",sx:{marginLeft:s&&"-8px !important",mt:s&&"8px !important"},children:a.jsx("span",{children:"manage cards & subscriptions"})})]}),s?a.jsxs(a.Fragment,{children:[a.jsx(z,{variant:"outlined",sx:n=>({borderRadius:"6px",mt:2,borderColor:n.palette.grey[50016]}),children:a.jsxs(L,{children:[a.jsx(l,{variant:"subtitle1",children:"Your Websites"}),a.jsx(l,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:"Manage your websites billing plans."}),a.jsx(t,{sx:{mt:.5},children:e==null?void 0:e.map((n,r)=>{var i,d,m,y,j,b,u,f,v,C,M;return a.jsxs(t,{display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"space-between",padding:"1rem 0",sx:U=>({borderBottom:r>=e.length-1?void 0:`1px solid ${U.palette.grey[50016]}`,paddingBottom:r>=e.length-1?"0 !important":void 0}),children:[a.jsxs(t,{display:"flex",flexDirection:"column",gap:".125rem",children:[a.jsx(l,{variant:"body1",fontWeight:500,children:n==null?void 0:n.storeName}),a.jsxs(l,{variant:"body2",color:"text.secondary",children:["https://",n==null?void 0:n.subDomain,".store.link"]}),a.jsxs(l,{variant:"body2",fontWeight:500,color:"#2563eb",children:[S((i=n==null?void 0:n.plan)==null?void 0:i.type),((d=n==null?void 0:n.plan)==null?void 0:d.type)!=="free"&&a.jsxs(a.Fragment,{children:[" - ",a.jsxs(l,{variant:"body2",fontWeight:500,component:"span",children:[((m=n==null?void 0:n.plan)==null?void 0:m.billingCycle)==="monthly"&&"Monthly",((y=n==null?void 0:n.plan)==null?void 0:y.billingCycle)==="yearly"&&"Yearly"]})]})]}),((j=n==null?void 0:n.plan)==null?void 0:j.cancelAt)&&a.jsxs(l,{variant:"body2",color:"text.disabled",children:["Plan ends on"," ",B(new Date(((b=n==null?void 0:n.plan)==null?void 0:b.cancelAt)*1e3),"MMM dd, yyyy")]}),((u=n==null?void 0:n.plan)==null?void 0:u.appleSubscriptionId)&&((f=n==null?void 0:n.applePendingPlan)==null?void 0:f.type)&&a.jsxs(l,{variant:"body2",color:"text.disabled",children:["Your plan will be updated to ",(v=n==null?void 0:n.applePendingPlan)==null?void 0:v.type,"-",(C=n==null?void 0:n.applePendingPlan)==null?void 0:C.billingCycle," on next billing cycle."]})]}),a.jsx(t,{display:"flex",alignItems:"center",justifyContent:"end",children:((M=n==null?void 0:n.plan)==null?void 0:M.type)==="free"?a.jsx(h,{variant:"contained",color:"primary",size:"small",onClick:()=>c(n==null?void 0:n.id),children:"Upgrade"}):a.jsx(h,{variant:"soft",color:"inherit",size:"small",onClick:()=>c(n==null?void 0:n.id),children:a.jsx("span",{children:"Change Plan"})})})]},n.id)})})]})}),a.jsx(z,{variant:"outlined",sx:n=>({borderRadius:"6px",mt:2,borderColor:n.palette.error.light}),children:a.jsxs(L,{children:[a.jsx(l,{variant:"subtitle1",children:"Delete Account"}),a.jsx(l,{variant:"body2",color:"text.secondary",sx:{mt:.5},children:"Permanently delete your account and all associated data."}),a.jsx(h,{color:"error",variant:"soft",sx:{textTransform:"none",mt:2},onClick:()=>g(!0),children:"Delete Account"}),a.jsx(cn,{open:w,onClose:()=>g(!1)})]})})]}):a.jsxs(a.Fragment,{children:[a.jsx(q,{sx:{my:3},light:!0}),a.jsx(t,{children:a.jsx(O,{component:G,children:a.jsxs(Q,{sx:{minWidth:350},"aria-label":"billing-table",children:[a.jsx(X,{children:a.jsxs(F,{sx:{"td, th":{borderColor:n=>n.palette.grey[50]},"th:first-of-type":{paddingLeft:0}},children:[a.jsx(x,{children:a.jsx(l,{variant:"subtitle1",children:"Stores"})}),a.jsx(x,{align:"left",children:a.jsx(l,{variant:"subtitle1",children:"Plan"})}),a.jsx(x,{align:"right",children:a.jsx(l,{variant:"subtitle1",children:"Actions"})})]})}),a.jsx(J,{children:e==null?void 0:e.map(n=>{var r,i,d,m,y,j,b,u,f,v,C;return a.jsxs(F,{sx:{"td, th":{border:0},th:{paddingLeft:0}},children:[a.jsxs(x,{component:"th",scope:"row",children:[a.jsx(W,{variant:"body1",maxWidth:{xs:180,sm:250},children:n==null?void 0:n.storeName}),a.jsxs(W,{variant:"body1",maxWidth:{xs:180,sm:250},color:"text.disabled",children:["https://",n==null?void 0:n.subDomain,".store.link"]})]}),a.jsxs(x,{align:"left",children:[a.jsxs(l,{variant:"body1",children:[S((r=n==null?void 0:n.plan)==null?void 0:r.type),((i=n==null?void 0:n.plan)==null?void 0:i.type)!=="free"&&a.jsxs(a.Fragment,{children:[" - ",a.jsxs(l,{variant:"body2",component:"span",children:[((d=n==null?void 0:n.plan)==null?void 0:d.billingCycle)==="monthly"&&"Monthly",((m=n==null?void 0:n.plan)==null?void 0:m.billingCycle)==="yearly"&&"Yearly"]})]})]}),((y=n==null?void 0:n.plan)==null?void 0:y.cancelAt)&&a.jsxs(l,{variant:"body2",color:"text.disabled",children:["Plan ends on"," ",B(new Date(((j=n==null?void 0:n.plan)==null?void 0:j.cancelAt)*1e3),"MMM dd, yyyy")]}),((b=n==null?void 0:n.plan)==null?void 0:b.appleSubscriptionId)&&((u=n==null?void 0:n.applePendingPlan)==null?void 0:u.type)&&a.jsxs(l,{variant:"body2",color:"text.disabled",children:["Your plan will be updated to ",(f=n==null?void 0:n.applePendingPlan)==null?void 0:f.type,"-",(v=n==null?void 0:n.applePendingPlan)==null?void 0:v.billingCycle," on next billing cycle."]})]}),a.jsx(x,{align:"right",children:a.jsx(A,{direction:"row",justifyContent:"flex-end",spacing:2,children:((C=n==null?void 0:n.plan)==null?void 0:C.type)==="free"?a.jsx(h,{variant:"contained",color:"primary",size:"small",onClick:()=>c(n==null?void 0:n.id),children:"Upgrade"}):a.jsx(h,{variant:"soft",color:"inherit",size:"small",onClick:()=>c(n==null?void 0:n.id),children:a.jsx("span",{children:"Change Plan"})})})})]},n==null?void 0:n.id)})})]})})})]})]})})]})}const cn=({open:s,onClose:e})=>
1{const P="Delete My Account",k=K(),[o,{isLoading:w}]=V(),[g,T]=D.useState(""),{data:c}=N(),n=D.useMemo(()=>c==null?void 0:c.find(i=>{var d;return((d=i==null?void 0:i.plan)==null?void 0:d.type)!=="free"}),[c]),r=()=>{o().unwrap().then(()=>{I("Account deleted successfully"),k("/")}).catch(i=>{const{message:d}=(i==null?void 0:i.data)||{};I(d??"Oops! Something went wrong",{severity:"error",persist:!0})})};return a.jsx(Z,{open:s,title:n?a.jsxs(a.Fragment,{children:[a.jsx(nn,{color:"warning",sx:{ml:"-2px"}})," Cannot delete Account!"]}):"Delete Account?",dialogProps:{rootProps:{maxWidth:"sm"},titleProps:{sx:{paddingBottom:"12px",display:"flex",alignItems:"center",gap:"6px"}}},content:n?a.jsxs(a.Fragment,{children:["This account has active ",a.jsx(p,{children:"paid"})," plans. To delete your account, please downgrade all stores to the ",a.jsx(p,{children:"Free"})," plan first."," ",a.jsxs("span",{style:{display:"block",marginTop:"1rem"},children:["Need help?"," ",a.jsx(l,{variant:"link",href:"https://store.link/help/contact",target:"_blank",rel:"noreferrer",children:"Contact us."})]})]}):a.jsxs(a.Fragment,{children:[a.jsxs(an,{children:["This will permanently delete your ",a.jsx(p,{children:"account"})," and all associated"," ",a.jsx(p,{children:"online stores"})," and their configurations. This action is"," ",a.jsx(p,{children:"irreversible."})," However your sheet data will ",a.jsx(p,{children:"not"})," be deleted."]}),a.jsxs(l,{variant:"body2",color:"text.secondary",mt:2,children:["Type ",a.jsx(p,{children:P})," to confirm and proceed."]}),a.jsx(ln,{variant:"outlined",margin:"normal",fullWidth:!0,size:"small",value:g,onChange:i=>T(i.target.value)})]}),actions:a.jsxs(a.Fragment,{children:[a.jsx(h,{onClick:e,disabled:w,variant:"outlined",color:"inherit",children:a.jsx("span",{children:n?"Close":"Cancel"})}),!n&&a.jsx(en,{onClick:r,variant:"contained",color:"error",loading:w,disabled:g!==P,children:a.jsx("span",{children:"Delete"})})]})})};export{on 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.