update www static files

This commit is contained in:
line-6000
2026-04-22 03:37:23 +08:00
parent b499bc01cf
commit 6ea5637f6b
31 changed files with 36 additions and 36 deletions
+1
View File
@@ -0,0 +1 @@
import{At as e,Ct as t,Dt as n,Et as r,Lc as i,Mt as a,Nt as o,Ot as s,St as c,Tt as l,bt as u,jt as d,kt as f,nu as p,ou as m,ru as h,wt as g,xt as _,yt as v}from"./messages-BovT1T-w.js";import{t as y}from"./button-DJA4fnJ8.js";import{n as b}from"./dist-DvAgZMq72.js";import{c as x,o as S,s as C}from"./zod-Cymc5bS-.js";import{a as w,c as T,i as E,l as D,n as O,o as k,s as A,t as j}from"./form-DdHiBYMe.js";import{t as M}from"./input-DiRPHDd8.js";import{t as N}from"./page-header-BBJ9dE3-.js";import{t as P}from"./textarea-D_TrrVtD.js";import{a as F,i as I,n as L,r as R,t as z}from"./lib-CCbQO2oA.js";var B=m(h(),1),V=p(),H=C({checkoutName:x().min(1,a()),logoUrl:x().url(d()).or(S(``)),siteTitle:x().min(1,e()),successCopy:x().min(1,f()),supportUrl:x().url(s()).or(S(``))});function U(){let e=I(`brand`),i=F(),a=D({resolver:T(H),defaultValues:{checkoutName:``,logoUrl:``,siteTitle:``,successCopy:``,supportUrl:``}});(0,B.useEffect)(()=>{let t=e.data?.data;t&&a.reset({checkoutName:z(t,`brand.checkout_name`),logoUrl:z(t,`brand.logo_url`),siteTitle:z(t,`brand.site_title`),successCopy:z(t,`brand.success_copy`),supportUrl:z(t,`brand.support_url`)})},[e.data,a]);let o=R();async function s(){for(let e of[`brand.checkout_name`,`brand.logo_url`,`brand.site_title`,`brand.success_copy`,`brand.support_url`])await o.mutateAsync({params:{path:{key:e}}});b.success(n()),await e.refetch()}async function d(t){await L(i.mutateAsync,[{group:`brand`,key:`brand.checkout_name`,type:`string`,value:t.checkoutName},{group:`brand`,key:`brand.logo_url`,type:`string`,value:t.logoUrl},{group:`brand`,key:`brand.site_title`,type:`string`,value:t.siteTitle},{group:`brand`,key:`brand.success_copy`,type:`string`,value:t.successCopy},{group:`brand`,key:`brand.support_url`,type:`string`,value:t.supportUrl}],r()),await e.refetch()}return(0,V.jsx)(j,{...a,children:(0,V.jsxs)(`form`,{className:`space-y-6`,onSubmit:a.handleSubmit(d),children:[(0,V.jsx)(E,{control:a.control,name:`checkoutName`,render:({field:e})=>(0,V.jsxs)(w,{children:[(0,V.jsx)(k,{children:l()}),(0,V.jsx)(O,{children:(0,V.jsx)(M,{...e})}),(0,V.jsx)(A,{})]})}),(0,V.jsx)(E,{control:a.control,name:`logoUrl`,render:({field:e})=>(0,V.jsxs)(w,{children:[(0,V.jsx)(k,{children:g()}),(0,V.jsx)(O,{children:(0,V.jsx)(M,{...e})}),(0,V.jsx)(A,{})]})}),(0,V.jsx)(E,{control:a.control,name:`siteTitle`,render:({field:e})=>(0,V.jsxs)(w,{children:[(0,V.jsx)(k,{children:t()}),(0,V.jsx)(O,{children:(0,V.jsx)(M,{...e})}),(0,V.jsx)(A,{})]})}),(0,V.jsx)(E,{control:a.control,name:`successCopy`,render:({field:e})=>(0,V.jsxs)(w,{children:[(0,V.jsx)(k,{children:c()}),(0,V.jsx)(O,{children:(0,V.jsx)(P,{...e})}),(0,V.jsx)(A,{})]})}),(0,V.jsx)(E,{control:a.control,name:`supportUrl`,render:({field:e})=>(0,V.jsxs)(w,{children:[(0,V.jsx)(k,{children:_()}),(0,V.jsx)(O,{children:(0,V.jsx)(M,{...e})}),(0,V.jsx)(A,{})]})}),(0,V.jsxs)(`div`,{className:`flex gap-2`,children:[(0,V.jsx)(y,{disabled:i.isPending||e.isLoading,type:`submit`,children:u()}),(0,V.jsx)(y,{disabled:o.isPending,onClick:s,type:`button`,variant:`outline`,children:v()})]})]})})}function W(){return(0,V.jsx)(N,{description:o(),title:i(),variant:`section`,children:(0,V.jsx)(U,{})})}var G=W;export{G as component};