Files
epusdt/src/www/assets/settings-BNo6orLH.js
T
line-6000 485059f60e - Removed manifest link from index.html.
- Updated script and module preload links in index.html for optimized loading.
- Modified service worker (sw.js) to reflect new asset revisions and improve caching strategy.
- Updated configuration documentation in BT_RUN.md, docker-RUN.md, and manual_RUN.md to clarify currency rate settings.
2026-04-24 19:10:11 +08:00

1 line
3.1 KiB
JavaScript

import{$u as e,Bt as t,Ft as n,Gt as r,Ht as i,It as a,Jt as o,Kt as s,Lt as c,Nl as l,Qu as u,Rt as d,Ut as f,Vt as p,Wt as m,Yt as h,nd as g,qt as _,zt as v}from"./messages-GNZRoNCJ.js";import{t as y}from"./button-CgehfZOz.js";import{n as b}from"./dist-5drZch9N.js";import{c as x,o as S,s as C}from"./zod-Ds1e9pAB.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-CltVYR9l.js";import{t as M}from"./input-DVA35bJk.js";import{t as N}from"./page-header-cy8MPm4c.js";import{t as P}from"./textarea-CcdJLvpz.js";import{a as F,i as I,n as L,r as R,t as z}from"./lib-CfV4j71f.js";var B=g(e(),1),V=u(),H=C({checkoutName:x().min(1,o()),logoUrl:x().url(_()).or(S(``)),siteTitle:x().min(1,s()),successCopy:x().min(1,r()),supportUrl:x().url(m()).or(S(``))});function U(){let e=I(`brand`),r=F(),o=D({resolver:T(H),defaultValues:{checkoutName:``,logoUrl:``,siteTitle:``,successCopy:``,supportUrl:``}});(0,B.useEffect)(()=>{let t=e.data?.data;t&&o.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,o]);let s=R();async function l(){for(let e of[`brand.checkout_name`,`brand.logo_url`,`brand.site_title`,`brand.success_copy`,`brand.support_url`])await s.mutateAsync({params:{path:{key:e}}});b.success(f()),await e.refetch()}async function u(t){await L(r.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}],i()),await e.refetch()}return(0,V.jsx)(j,{...o,children:(0,V.jsxs)(`form`,{className:`space-y-6`,onSubmit:o.handleSubmit(u),children:[(0,V.jsx)(E,{control:o.control,name:`checkoutName`,render:({field:e})=>(0,V.jsxs)(w,{children:[(0,V.jsx)(k,{children:p()}),(0,V.jsx)(O,{children:(0,V.jsx)(M,{...e})}),(0,V.jsx)(A,{})]})}),(0,V.jsx)(E,{control:o.control,name:`logoUrl`,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:o.control,name:`siteTitle`,render:({field:e})=>(0,V.jsxs)(w,{children:[(0,V.jsx)(k,{children:v()}),(0,V.jsx)(O,{children:(0,V.jsx)(M,{...e})}),(0,V.jsx)(A,{})]})}),(0,V.jsx)(E,{control:o.control,name:`successCopy`,render:({field:e})=>(0,V.jsxs)(w,{children:[(0,V.jsx)(k,{children:d()}),(0,V.jsx)(O,{children:(0,V.jsx)(P,{...e})}),(0,V.jsx)(A,{})]})}),(0,V.jsx)(E,{control:o.control,name:`supportUrl`,render:({field:e})=>(0,V.jsxs)(w,{children:[(0,V.jsx)(k,{children:c()}),(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:r.isPending||e.isLoading,type:`submit`,children:a()}),(0,V.jsx)(y,{disabled:s.isPending,onClick:l,type:`button`,variant:`outline`,children:n()})]})]})})}function W(){return(0,V.jsx)(N,{description:h(),title:l(),variant:`section`,children:(0,V.jsx)(U,{})})}var G=W;export{G as component};