This commit is contained in:
1 parent
b9655a5ab1
commit
e292824161
122 files changed
+90002
-69
No files matched your search
@@ -0,0 +1,19 @@
|
||||
import{r as h,R as Ne,j as e}from"./react-vendor-jWT2yUdV.js";import{a as ce,c as ue}from"./chunk-5PILOUBS-KHYNqMZE.js";import{t as _e,a as H}from"./chunk-ML27DD5T-ZFWrMOn-.js";import{E as tr,n as Fe,D as ze,c as D,b as z,P as q,W as E,F as pe,G as fe,H as be,I as Be,J as sr,u as de,k as te,K as Qe}from"./index-DiaaLdUu.js";import{u as ar,i as T}from"./chunk-2QAN2V2R-B2qCPZrG.js";import{d as or}from"./chunk-IHO36JMK-DJPUeGG0.js";import{a as ir}from"./chunk-SXMLSBOY-NckgDZ9w.js";import{u as he}from"./useRequest-B1BwPztr.js";import{u as Q,C,a as nr}from"./react-hook-form-DTbqnRcd.js";import{z as x}from"./react-hot-toast-cGcFZPSt.js";import{a as Oe,f as Te}from"./index-DvErMbt6.js";import{G as lr,Q as dr}from"./index-D6HfLP9Q.js";import{Q as K}from"./qq_manager-BfRTEAby.js";import{P as cr,w as ur,s as hr}from"./process_utils-Bjmp-2dU.js";import{S as A}from"./switch_card-5j4Yjx-K.js";import{u as mr}from"./use-config-Cu0QvgCe.js";import{s as Ve,l as G}from"./chunk-KVDW62ZT-CGYYmJoP.js";import{_ as xr,g as gr}from"./codemirror-core-782AVq39.js";import{C as pr}from"./chunk-M3MASYO7-B4fjH-eW.js";import{c as Ke}from"./chunk-D5XJWRAV-DVN21qSw.js";import{c as qe}from"./chunk-NAV3ZXLI-ChbUTMf0.js";import{G as Se}from"./iconBase-B7bT1FlI.js";import{b as fr}from"./index-_HIxriDC.js";import{b as br,a as wr}from"./index-DE7yoXMZ.js";import{p as vr,a as yr,b as jr}from"./chunk-2QQAR2RD-YG5LNmAk.js";import{F as le}from"./file_manager-BG19iFYW.js";import{l as kr,m as Nr}from"./index-FvTxWQTZ.js";import{i as Sr}from"./chunk-MLPFQTYO-DSnBqIsb.js";import{u as Xe,c as Cr}from"./react-router-dom-C6k78GT4.js";import{c as Lr,d as Ir}from"./index-BBhZPeTB.js";import"./qface-BZLvZXJ8.js";import"./index-BV9-YCKp.js";import"./chunk-UX7UMZL5-CMHjUaC_.js";import"./SelectionManager-Dl9uHsLK.js";import"./usePress-BrNwsdVw.js";import"./layout-Buao20KT.js";import"./gestures-BHfQC-M8.js";import"./features-animation-BkV7kg8P.js";import"./Item-D8Sud-UP.js";import"./chunk-SLABUSGS-Cmz8sGrU.js";import"./useFocusable-DA5Croun.js";import"./chunk-RJKRL3AU-CjtrMR1U.js";import"./chunk-AXSF7SRE-Cr4elNVq.js";import"./index-BsnVex0g.js";import"./use-dialog-CRIMuzeE.js";import"./chunk-J6JGI6RM-Djlxjgjl.js";import"./chunk-EN4B57RQ-Ief8qCCd.js";import"./useToggle-B3ZYBe5S.js";import"./chunk-WQVQ7P2I-BJd1EiqP.js";import"./DOMLayoutDelegate-DOgfSALU.js";import"./useHover-DC1o5-bm.js";import"./chunk-FGM523TA-CgSvUh2a.js";var Mr=h.useLayoutEffect,Fr=function(s){var t=Ne.useRef(s);return Mr(function(){t.current=s}),t},Pe=function(s,t){if(typeof s=="function"){s(t);return}s.current=t},zr=function(s,t){var a=Ne.useRef();return Ne.useCallback(function(d){s.current=d,a.current&&Pe(a.current,null),a.current=t,t&&Pe(t,d)},[t])},Re={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0",display:"block"},Tr=function(s){Object.keys(Re).forEach(function(t){s.style.setProperty(t,Re[t],"important")})},Ee=Tr,W=null,We=function(s,t){var a=s.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?a+t.borderSize:a-t.paddingSize};function Pr(r,s,t,a){t===void 0&&(t=1),a===void 0&&(a=1/0),W||(W=document.createElement("textarea"),W.setAttribute("tabindex","-1"),W.setAttribute("aria-hidden","true"),Ee(W)),W.parentNode===null&&document.body.appendChild(W);var d=r.paddingSize,o=r.borderSize,i=r.sizingStyle,m=i.boxSizing;Object.keys(i).forEach(function(n){var j=n;W.style[j]=i[j]}),Ee(W),W.value=s;var l=We(W,r);W.value=s,l=We(W,r),W.value="x";var u=W.scrollHeight-d,c=u*t;m==="border-box"&&(c=c+d+o),l=Math.max(c,l);var g=u*a;return m==="border-box"&&(g=g+d+o),l=Math.min(g,l),[l,u]}var Ue=function(){},Rr=function(s,t){return s.reduce(function(a,d){return a[d]=t[d],a},{})},Er=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width","wordBreak","wordSpacing","scrollbarGutter"],Wr=!!document.documentElement.currentStyle,Ur=function(s){var t=window.getComputedStyle(s);if(t===null)return null;var a=Rr(Er,t),d=a.boxSizing;if(d==="")return null;Wr&&d==="border-box"&&(a.width=parseFloat(a.width)+parseFloat(a.borderRightWidth)+parseFloat(a.borderLeftWidth)+parseFloat(a.paddingRight)+parseFloat(a.paddingLeft)+"px");var o=parseFloat(a.paddingBottom)+parseFloat(a.paddingTop),i=parseFloat(a.borderBottomWidth)+parseFloat(a.borderTopWidth);return{sizingStyle:a,paddingSize:o,borderSize:i}},Ar=Ur;function Ce(r,s,t){var a=Fr(t);h.useLayoutEffect(function(){var d=function(i){return a.current(i)};if(r)return r.addEventListener(s,d),function(){return r.removeEventListener(s,d)}},[])}var Hr=function(s,t){Ce(document.body,"reset",function(a){s.current.form===a.target&&t(a)})},Dr=function(s){Ce(window,"resize",s)},$r=function(s){Ce(document.fonts,"loadingdone",s)},_r=["cacheMeasurements","maxRows",Line truncated
|
||||
${f===y.uin?"border-primary bg-primary/10 dark:bg-primary/20 shadow-sm":"border-default-200 dark:border-default-100/10 bg-default-100/50 dark:bg-white/5 hover:bg-default-200/50 dark:hover:bg-white/10"}`,children:[e.jsx(ir,{src:y.faceUrl,name:((I=y.nickName)==null?void 0:I.charAt(0))||y.uin.charAt(0),size:"sm",className:"flex-shrink-0"}),e.jsxs("div",{className:"flex flex-col min-w-0",children:[e.jsx("span",{className:"text-sm font-medium text-default-700 truncate",children:y.nickName||"未知昵称"}),e.jsx("span",{className:"text-xs text-default-400 truncate",children:y.uin})]}),f===y.uin&&e.jsx("span",{className:"ml-auto text-xs text-primary font-medium flex-shrink-0",children:"已选择"})]},y.uin)}),t.filter(y=>!y.isQuickLogin).length>0&&e.jsxs("div",{className:"col-span-full text-xs text-default-400 mt-1",children:["以下账号不支持快速登录:",t.filter(y=>!y.isQuickLogin).map(y=>y.uin).join("、")]})]})]}),e.jsx(Y,{onSubmit:N,reset:w,isSubmitting:n||m,refresh:L}),e.jsxs("div",{className:"flex-shrink-0 w-full mt-6 pt-6 border-t border-divider",children:[e.jsx("div",{className:"mb-3 text-sm text-default-600",children:"进程管理"}),e.jsx(z,{color:"warning",variant:"flat",onPress:F,isLoading:r,isDisabled:r,fullWidth:!0,children:r?"正在重启进程...":"重启进程"}),e.jsx("div",{className:"mt-2 text-xs text-default-500",children:"重启进程将关闭当前 Worker 进程,等待 3 秒后启动新进程"})]}),e.jsx(or,{className:"mt-6"}),e.jsxs("div",{className:"flex-shrink-0 w-full mt-4",children:[e.jsx("div",{className:"mb-3 text-sm text-default-600",children:"设备 GUID 管理"}),e.jsx("div",{className:"text-xs text-default-400 mb-3",children:"GUID 是设备登录唯一识别码,存储在 Registry20 文件中。修改后需重启生效。"}),e.jsx(lr,{showRestart:!1})]})]})},Vr=()=>{const{config:r,saveConfigWithoutNetwork:s,refreshConfig:t}=mr(),[a,d]=h.useState(!1),{control:o,handleSubmit:i,formState:{isSubmitting:m},setValue:l}=Q({defaultValues:{musicSignUrl:"",enableLocalFile2Url:!1,parseMultMsg:!1,imageDownloadProxy:"",timeout:{baseTimeout:1e4,uploadSpeedKBps:256,downloadSpeedKBps:256,maxTimeout:18e5}}}),u=()=>{l("musicSignUrl",r.musicSignUrl),l("enableLocalFile2Url",r.enableLocalFile2Url),l("parseMultMsg",r.parseMultMsg),l("imageDownloadProxy",r.imageDownloadProxy),l("timeout",r.timeout??{baseTimeout:1e4,uploadSpeedKBps:256,downloadSpeedKBps:1e3,maxTimeout:18e5})},c=i(async n=>{try{await s(n),x.success("保存成功")}catch(j){const k=j.message;x.error(`保存失败: ${k}`)}}),g=async(n=!0)=>{try{d(!0),await t(),n&&x.success("刷新成功")}catch(j){const k=j.message;x.error(`刷新失败: ${k}`)}finally{d(!1)}};return h.useEffect(()=>{u()},[r]),h.useEffect(()=>{g(!1)},[]),a?e.jsx("div",{className:"relative w-full min-h-[220px]",children:e.jsx(q,{loading:!0})}):e.jsxs(e.Fragment,{children:[e.jsx("title",{children:"OneBot配置 - SnowCat WebUI"}),e.jsx(C,{control:o,name:"musicSignUrl",render:({field:n})=>e.jsx(T,{...n,label:"音乐签名地址",placeholder:"请输入音乐签名地址",classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400"}})}),e.jsx(C,{control:o,name:"enableLocalFile2Url",render:({field:n})=>e.jsx(A,{...n,description:"启用本地文件到URL",label:"启用本地文件到URL"})}),e.jsx(C,{control:o,name:"parseMultMsg",render:({field:n})=>e.jsx(A,{...n,description:"启用上报解析合并消息",label:"启用上报解析合并消息"})}),e.jsx(C,{control:o,name:"imageDownloadProxy",render:({field:n})=>e.jsx(T,{...n,label:"图片下载代理",placeholder:"请输入代理地址,如 http://127.0.0.1:7890",classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400"}})}),e.jsx(C,{control:o,name:"timeout.baseTimeout",render:({field:n})=>{var j;return e.jsx(T,{...n,type:"number",label:"基础超时时间(毫秒)",placeholder:"10000",value:((j=n.value)==null?void 0:j.toString())??"",onChange:k=>n.onChange(parseInt(k.target.value)||0),classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400"}})}}),e.jsx(C,{control:o,name:"timeout.uploadSpeedKBps",render:({field:n})=>{var j;return e.jsx(T,{...n,type:"number",label:"预估上传速度(KB/s)",placeholder:"256",value:((j=n.value)==null?void 0:j.toString())??"",onChange:k=>n.onChange(parseInt
Line truncated
|
||||
`)):r.accessControlMode==="blacklist"&&o((r.ipBlacklist||[]).join(`
|
||||
`)))},j=m(async f=>{try{const w=d.split(`
|
||||
`).map(N=>N.trim()).filter(N=>N.length>0),b={...f,ipWhitelist:f.accessControlMode==="whitelist"?w:[],ipBlacklist:f.accessControlMode==="blacklist"?w:[]};await E.updateWebUIConfig(b),x.success("保存成功")}catch(w){const b=w.message;x.error(`保存失败: ${b}`)}}),k=async()=>{try{await a(),x.success("刷新成功")}catch(f){const w=f.message;x.error(`刷新失败: ${w}`)}};return h.useEffect(()=>{n()},[r]),h.useEffect(()=>{(async()=>{if(r)if(g==="whitelist"){const w=r.ipWhitelist||[];if(w.length===0)try{const b=await E.getClientIP();b!=null&&b.ip?o(b.ip):o("")}catch(b){console.error("获取客户端IP失败:",b),o("")}else o(w.join(`
|
||||
`))}else o(g==="blacklist"?(r.ipBlacklist||[]).join(`
|
||||
`):"")})()},[g,r]),s?e.jsx("div",{className:"relative w-full min-h-[220px]",children:e.jsx(q,{loading:!0})}):e.jsxs(e.Fragment,{children:[e.jsx("title",{children:"服务器配置 - SnowCat WebUI"}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-full font-semibold text-[11px] uppercase tracking-[0.12em] text-default-400 border-l-2 border-primary-400/50 pl-2.5",children:"服务器配置"}),e.jsx(C,{control:i,name:"host",render:({field:f})=>e.jsx(T,{...f,label:"监听地址",placeholder:"请输入监听地址",description:"服务器监听的IP地址,0.0.0.0表示监听所有网卡",isDisabled:!!t,errorMessage:t?"获取配置失败":void 0,classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400"}})}),e.jsx(C,{control:i,name:"port",render:({field:f})=>{var w;return e.jsx(T,{...f,type:"number",value:((w=f.value)==null?void 0:w.toString())||"",label:"监听端口",placeholder:"请输入监听端口",description:"服务器监听的端口号,范围1-65535",isDisabled:!!t,errorMessage:t?"获取配置失败":void 0,onChange:b=>f.onChange(parseInt(b.target.value)||0),classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-gray-800 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500"}})}}),e.jsx(C,{control:i,name:"loginRate",render:({field:f})=>{var w;return e.jsx(T,{...f,type:"number",value:((w=f.value)==null?void 0:w.toString())||"",label:"登录速率限制",placeholder:"请输入登录速率限制",description:"每小时允许的登录尝试次数",isDisabled:!!t,errorMessage:t?"获取配置失败":void 0,onChange:b=>f.onChange(parseInt(b.target.value)||0),classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-gray-800 dark:text-white placeholder:text-gray-400 dark:placeholder:text-gray-500"}})}})]}),e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsx("div",{className:"flex-shrink-0 w-full font-semibold text-[11px] uppercase tracking-[0.12em] text-default-400 border-l-2 border-primary-400/50 pl-2.5",children:"安全配置"}),e.jsx(C,{control:i,name:"disableWebUI",render:({field:f})=>e.jsx(A,{value:f.value,onValueChange:w=>f.onChange(w),disabled:!!t,label:"禁用WebUI",description:"启用后将完全禁用WebUI服务,需要重启生效"})}),e.jsxs("div",{className:"flex flex-col gap-3 mt-2",children:[e.jsx("div",{className:"text-sm font-medium text-default-700 dark:text-default-300 px-1",children:"网络访问控制"}),e.jsx(C,{control:i,name:"accessControlMode",render:({field:f})=>e.jsxs(Ve,{...f,label:"访问控制模式",placeholder:"选择访问控制模式",description:"选择如何控制网络访问",selectedKeys:[f.value],onSelectionChange:w=>{const b=Array.from(w)[0];f.onChange(b)},isDisabled:!!t,classNames:{trigger:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35"},children:[e.jsx(G,{value:"none",children:"不限制"},"none"),e.jsx(G,{value:"whitelist",children:"白名单模式"},"whitelist"),e.jsx(G,{value:"blacklist",children:"黑名单模式"},"blacklist")]})}),g!=="none"&&e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("label",{className:"text-sm font-medium text-default-700 dark:text-default-300",children:g==="whitelist"?"IP白名单":"IP黑名单"}),e.jsx("textarea",{value:d,onChange:f=>o(f.target.value),placeholder:`每行一个IP地址或规则
|
||||
支持格式:
|
||||
IPv4:
|
||||
- 精确IP: 192.168.1.100
|
||||
- 通配符: 192.168.1.*
|
||||
- CIDR: 192.168.1.0/24
|
||||
IPv6:
|
||||
- 精确IP: 2001:db8::1
|
||||
- CIDR: 2001:db8::/32`,disabled:!!t,rows:10,className:"w-full px-3 py-2 bg-default-100/50 dark:bg-white/5 backdrop-blur-md border border-transparent hover:bg-default-200/50 dark:hover:bg-white/10 transition-all shadow-sm hover:border-default-300 rounded-lg text-default-700 dark:text-default-300 placeholder:text-default-400 font-mono text-sm resize-y focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent disabled:opacity-50 disabled:cursor-not-allowed"}),e.jsx("p",{className:"text-xs text-default-500",children:g==="whitelist"?"只有列表中的IP可以访问":"列表中的IP将被拒绝访问"})]}),e.jsxs("div",{className:"text-xs text-default-500 px-1",children:[e.jsx("div",{className:"font-medium mb-1",children:"示例规则:"}),e.jsxs("div",{className:"space-y-0.5 font-mono",children:[e.jsx("div",{children:"• 127.0.0.1 (IPv4 本地回环)"}),e.jsx("div",{children:"• 192.168.1.* (IPv4 通配符)"}),e.jsx("div",{children:"• 10.0.0.0/8 (IPv4 CIDR)"}),e.jsx("div",{children:"• ::1 (IPv6 本地回环)"}),e.jsx("div",{children:"• 2001:db8::/32 (IPv6 CIDR)"})]})]})]}),e.jsx(C,{control:i,name:"enableXForwardedFor",render:({field:f})=>e.jsx(A,{value:f.value,onValueChange:w=>f.onChange(w),disabled:!!t,label:"启用 X-Forwarded-For",description:"启用后将从 X-Forwarded-For 头部获取真实IP地址(适用于反向代理场景)"})})]})]})]}),e.jsx(Y,{onSubmit:j,reset:n,isSubmitting:l||s,refresh:k})]})},qr=()=>{const{data:r,loading:s,refreshAsync:t}=he(E.getSSLStatus),[a,d]=h.useState(""),[o,i]=h.useState(""),[m,l]=h.useState(!1);h.useEffect(()=>{r&&(d(r.certContent||""),i(r.keyContent||""))},[r]);const u=async()=>{if(!a.trim()||!o.trim()){x.error("证书和私钥内容不能为空");return}l(!0);try{const n=await E.saveSSLCert(a,o);x.success(n.message||"SSL证书保存成功"),await t()}catch(n){const j=n.message;x.error(`保存SSL证书失败: ${j}`)}finally{l(!1)}},c=async()=>{l(!0);try{const n=await E.deleteSSLCert();x.success(n.message||"SSL证书已删除"),d(""),i(""),await t()}catch(n){const j=n.message;x.error(`删除SSL证书失败: ${j}`)}finally{l(!1)}},g=async()=>{try{await t(),x.success("刷新成功")}catch(n){const j=n.message;x.error(`刷新失败: ${j}`)}};return s?e.jsx("div",{className:"relative w-full min-h-[220px]",children:e.jsx(q,{loading:!0})}):e.jsxs(e.Fragment,{children:[e.jsx("title",{children:"SSL配置 - SnowCat WebUI"}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"flex flex-col gap-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex-shrink-0 w-full font-semibold text-[11px] uppercase tracking-[0.12em] text-default-400 border-l-2 border-primary-400/50 pl-2.5",children:"SSL/HTTPS 配置"}),(r==null?void 0:r.enabled)&&e.jsx("span",{className:"px-2 py-0.5 text-xs bg-success-100 text-success-700 dark:bg-success-900/30 dark:text-success-400 rounded-full whitespace-nowrap",children:"已启用"})]}),e.jsx("p",{className:"text-sm text-default-500 px-1",children:"配置SSL证书后重启即可启用HTTPS。将证书(cert.pem)和私钥(key.pem)的内容粘贴到下方文本框中。"}),e.jsx("div",{className:"p-3 bg-warning-50/70 dark:bg-warning-900/20 rounded-xl border border-warning-200/70 dark:border-warning-800/40",children:e.jsxs("p",{className:"text-xs leading-relaxed text-warning-700 dark:text-warning-400",children:[e.jsx("strong",{children:"注意:"}),"保存证书后需要重启服务才能生效。删除证书后同样需要重启才能切换回HTTP模式。"]})})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(Ae,{label:"证书内容 (cert.pem)",placeholder:`-----BEGIN CERTIFICATE-----
|
||||
...
|
||||
-----END CERTIFICATE-----`,value:a,onValueChange:d,minRows:6,maxRows:12,classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400 font-mono text-sm"}}),e.jsx(Ae,{label:"私钥内容 (key.pem)",placeholder:`-----BEGIN PRIVATE KEY-----
|
||||
...
|
||||
-----END PRIVATE KEY-----`,value:o,onValueChange:i,minRows:6,maxRows:12,classNames:{inputWrapper:"bg-white/80 dark:bg-white/[0.06] backdrop-blur-md border border-black/[0.08] dark:border-white/12 hover:bg-white/95 dark:hover:bg-white/[0.09] transition-all shadow-sm data-[hover=true]:border-primary/35",input:"bg-transparent text-default-700 placeholder:text-default-400 font-mono text-sm"}})]}),e.jsxs("div",{className:"flex gap-2 justify-end pt-4 border-t border-white/50 dark:border-white/[0.06]",children:[e.jsx(z,{variant:"flat",radius:"full",className:"bg-white/60 dark:bg-white/[0.06] text-default-600 border border-white/50 dark:border-white/10",isLoading:m||s,onPress:g,size:"sm",children:"刷新"}),(r==null?void 0:r.enabled)&&e.jsx(z,{color:"danger",variant:"flat",radius:"full",isLoading:m||s,onPress:c,size:"sm",children:"删除SSL证书"}),e.jsx(z,{color:"primary",radius:"full",className:"font-semibold bg-gradient-to-r from-primary-400 to-primary-600 shadow-md shadow-primary-500/25 px-5",isLoading:m||s,onPress:u,size:"sm",children:"保存SSL证书"})]})]})]})};function Ye(r){return Se({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z"},child:[]}]})(r)}function He(r){return Se({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M432 416h-23.41L277.88 53.69A32 32 0 0 0 247.58 32h-47.16a32 32 0 0 0-30.3 21.69L39.41 416H16a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16h-19.58l23.3-64h152.56l23.3 64H304a16 16 0 0 0-16 16v32a16 16 0 0 0 16 16h128a16 16 0 0 0 16-16v-32a16 16 0 0 0-16-16zM176.85 272L224 142.51 271.15 272z"},child:[]}]})(r)}function Xr(r){return Se({attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M64 224h13.5c24.7 56.5 80.9 96 146.5 96s121.8-39.5 146.5-96H384c8.8 0 16-7.2 16-16v-96c0-8.8-7.2-16-16-16h-13.5C345.8 39.5 289.6 0 224 0S102.2 39.5 77.5 96H64c-8.8 0-16 7.2-16 16v96c0 8.8 7.2 16 16 16zm40-88c0-22.1 21.5-40 48-40h144c26.5 0 48 17.9 48 40v24c0 53-43 96-96 96h-48c-53 0-96-43-96-96v-24zm72 72l12-36 36-12-36-12-12-36-12 36-36 12 36 12 12 36zm151.6 113.4C297.7 340.7 262.2 352 224 352s-73.7-11.3-103.6-30.6C52.9 328.5 0 385 0 454.4v9.6c0 26.5 21.5 48 48 48h80v-64c0-17.7 14.3-32 32-32h128c17.7 0 32 14.3 32 32v64h80c26.5 0 48-21.5 48-48v-9.6c0-69.4-52.9-125.9-120.4-133zM272 448c-8.8 0-16 7.2-16 16s7.2 16 16 16 16-7.2 16-16-7.2-16-16-16zm-96 0c-8.8 0-16 7.2-16 16v48h32v-48c0-8.8-7.2-16-16-16z"},child:[]}]})(r)}const Gr={dark:{"--heroui-background":"0 0% 0%","--heroui-foreground-50":"240 5.88% 10%","--heroui-foreground-100":"240 3.7% 15.88%","--heroui-foreground-200":"240 5.26% 26.08%","--heroui-foreground-300":"240 5.2% 33.92%","--heroui-foreground-400":"240 3.83% 46.08%","--heroui-foreground-500":"240 5.03% 64.9%","--heroui-foreground-600":"240 4.88% 83.92%","--heroui-foreground-700":"240 5.88% 90%","--heroui-foreground-800":"240 4.76% 95.88%","--heroui-foreground-900":"0 0% 98.04%","--heroui-foreground":"210 5.56% 92.94%","--heroui-focus":"212.01999999999998 100% 46.67%","--heroui-overlay":"0 0% 0%","--heroui-divider":"0 0% 100%","--heroui-divider-opacity":"0.15","--heroui-content1":"240 5.88% 10%","--heroui-content1-foreground":"0 0% 98.04%","--heroui-content2":"240 3.7% 15.88%","--heroui-content2-foreground":"240 4.76% 95.88%","--heroui-content3":"240 5.26% 26.08%","--heroui-content3-foreground":"240 5.88% 90%","--heroui-content4":"240 5.2% 33.92%","--heroui-content4-foreground":"240 4.88% 83.92%","--heroui-default-50":"240 5.88% 10%","--heroui-default-100":"240 3.7% 15.88%","--heroui-default-200":"240 5.26% 26.08%","--heroui-default-300":"240 5.2% 33.92%","--heroui-default-400":"240 3.83% 46.08%","--heroui-default-500":"240 5.03% 64.9%","--heroui-default-600":"240 4.88% 83.92%","--heroui-default-700":"240 5.88% 90%","--heroui-default-800":"240 4.76% 95.88%","--heroui-default-900":"0 0% 98.04%","--heroui-default-foreground":"0 0% 100%","--heroui-default":"240 5.26% 26.08%","--heroui-danger-50":"340 84.91% 10.39%","--heroui-danger-100":"339.33 86.54% 20.39%","--heroui-danger-200":"339.11 85.99% 30.78%","--heroui-danger-300":"339 86.54% 40.78%","--heroui-danger-400":"339.2 90.36% 51.18%","--heroui-danger-500":"339 90% 60.78%","--heroui-danger-600":"339.11 90.6% 70.78%","--heroui-danger-700":"339.33 90% 80.39%","--heroui-danger-800":"340 91.84% 90.39%","--heroui-danger-900":"339.13 92% 95.1%","--heroui-danger-foreground":"0 0% 100%","--heroui-danger":"339.2 90.36% 51.18%","--heroui-primary-50":"205.5 85% 9.61%","--heroui-primary-100":"205.5 85% 19.22%","--heroui-primary-200":"206 85% 28.82%","--heroui-primary-300":"205.5 85% 38.43%","--heroui-primary-400":"206 85% 46.67%","--heroui-primary-500":"206 78% 58.43%","--heroui-primary-600":"206 78% 68.82%","--heroui-primary-7
Line truncated
|
||||
Reference in new issue
Block a user