PageSourceSearch

https://youthfireit.com/assets/reseller.branding-C7rBh9Cu.js

js youthfireit.com collected 2026-10-05 02:41:54 UTC 5,583 bytes, 1 lines download raw bytes

1import{j as e}from"./radix-C7m_p3hd.js";import{a as d,q as j,ab as v}from"./icons-Byb5nA6I.js";import{aj as f,an as y,aq as b,t as x}from"./index-QwT9_GrP.js";import{u as N}from"./useSuspenseQuery-DQaB95Mf.js";import{C as o,b as t,c as m,a as c}from"./card-WJomPFy5.js";import{B as C}from"./button-aZOsfQvV.js";import{I as i}from"./input-BDda6t1w.js";import{L as n}from"./label-Cywe519D.js";import{T as u}from"./textarea-DIbiZgd6.js";import"./pdf-BQaX5Z90.js";import"./editor-BVBPyX6q.js";import"./charts-CkbpeChh.js";import"./index-DpFz0cJn.js";function U(){const{data:s}=N(f()),g=y(),[a,l]=d.useState({brand_name:s?.brand_name??"",logo_url:s?.logo_url??"",favicon_url:s?.favicon_url??"",primary_color:s?.primary_color??"#0B2545",secondary_color:s?.secondary_color??"#FF6B35",email_from_name:s?.email_from_name??"",email_from_address:s?.email_from_address??"",support_email:s?.support_email??"",support_whatsapp:s?.support_whatsapp??"",marketing_tagline_en:s?.marketing_tagline_en??"",marketing_tagline_bn:s?.marketing_tagline_bn??""}),[_,p]=d.useState(!1);d.useEffect(()=>{s&&l({brand_name:s.brand_name??"",logo_url:s.logo_url??"",favicon_url:s.favicon_url??"",primary_color:s.primary_color??"#0B2545",secondary_color:s.secondary_color??"#FF6B35",email_from_name:s.email_from_name??"",email_from_address:s.email_from_address??"",support_email:s.support_email??"",support_whatsapp:s.support_whatsapp??"",marketing_tagline_en:s.marketing_tagline_en??"",marketing_tagline_bn:s.marketing_tagline_bn??""})},[s]);async function h(){p(!0);try{await b({data:{brand_name:a.brand_name||null,logo_url:a.logo_url||null,favicon_url:a.favicon_url||null,primary_color:a.primary_color||null,secondary_color:a.secondary_color||null,email_from_name:a.email_from_name||null,email_from_address:a.email_from_address||null,support_email:a.support_email||null,support_whatsapp:a.support_whatsapp||null,marketing_tagline_en:a.marketing_tagline_en||null,marketing_tagline_bn:a.marketing_tagline_bn||null}}),x.success("Branding saved"),g.invalidateQueries({queryKey:["reseller","me"]})}catch(r){x.error(r instanceof Error?r.message:"Save failed")}finally{p(!1)}}return e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-bold",children:"Branding"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Logo, colors, and emails your clients see on your white-labeled portal."})]}),e.jsxs(o,{children:[e.jsx(t,{className:"pb-2",children:e.jsx(m,{className:"text-base",children:"Identity"})}),e.jsxs(c,{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"Brand name"}),e.jsx(i,{value:a.brand_name,onChange:r=>l({...a,brand_name:r.target.value})})]}),e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"Logo URL"}),e.jsx(i,{value:a.logo_url,placeholder:"https://cdn.example.com/logo.png",onChange:r=>l({...a,logo_url:r.target.value})})]}),e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"Favicon URL"}),e.jsx(i,{value:a.favicon_url,onChange:r=>l({...a,favicon_url:r.target.value})})]})]})]}),e.jsxs(o,{children:[e.jsx(t,{className:"pb-2",children:e.jsx(m,{className:"text-base",children:"Colors"})}),e.jsxs(c,{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"Primary (#hex)"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(i,{value:a.primary_color,onChange:r=>l({...a,primary_color:r.target.value})}),e.jsx("div",{className:"h-9 w-12 rounded border",style:{background:a.primary_color}})]})]}),e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"Secondary (#hex)"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(i,{value:a.secondary_color,onChange:r=>l({...a,secondary_color:r.target.value})}),e.jsx("div",{className:"h-9 w-12 rounded border",style:{background:a.secondary_color}})]})]})]})]}),e.jsxs(o,{children:[e.jsx(t,{className:"pb-2",children:e.jsx(m,{className:"text-base",children:"Email"})}),e.jsxs(c,{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"From name"}),e.jsx(i,{value:a.email_from_name,onChange:r=>l({...a,email_from_name:r.target.value})})]}),e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"From address"}),e.jsx(i,{type:"email",value:a.email_from_address,onChange:r=>l({...a,email_from_address:r.target.value})})]}),e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"Support email"}),e.jsx(i,{type:"email",value:a.support_email,onChange:r=>l({...a,support_email:r.target.value})})]}),e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"Support WhatsApp"}),e.jsx(i,{value:a.support_whatsapp,onChange:r=>l({...a,support_whatsapp:r.target.value})})]})]})]}),e.jsxs(o,{children:[e.jsx(t,{className:"pb-2",children:e.jsx(m,{className:"text-base",children:"Marketing tagline"})}),e.jsxs(c,{className:"grid gap-3 sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"English"}),e.jsx(u,{rows:2,value:a.marketing_tagline_en,onChange:r=>l({...a,marketing_tagline_en:r.target.value})})]}),e.jsxs("div",{children:[e.jsx(n,{className:"text-xs",children:"Bangla"}),e.jsx(u,{rows:2,value:a.marketing_tagline_bn,onChange:r=>l({...a,marketing_tagline_bn:r.target.value})})]})]})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(C,{onClick:h,disabled:_,children:[_?e.jsx(j,{className:"mr-1 h-3 w-3 animate-spin"}):e.jsx(v,{className:"mr-1 h-3 w-3"}),"Save branding"]})})]})}export{U as component};

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.