import{P as C}from"./app-BGgVpkqZ.js";import{i as x,c as T}from"./app-Ba7ZqSpq.js";import{T as m}from"./app-DoVkxbmA.js";import{C as v}from"./app-BjiVQlSS.js";import{a as N,_ as V}from"./app-D9TrJBlL.js";import{_ as I,a as b}from"./app-BP4V3LUd.js";import{T as y}from"./app-COidJXl1.js";import{C as i}from"./app-Bt2pXSov.js";import{o as r,c as d,w as e,b as n,f as a,t as l,u as o,h as u,g as _,F as g,D as k,a as s}from"./app-SC54XQDl.js";import"./app-yUrwy8EY.js";import"./app-C2mBgI5Z.js";import"./app-_Ovp2dOH.js";import"./app-BjSCO7rC.js";function M(){x(this),this.indent=function(p){let t="";for(let c=0;c<p;c++)t+=" &nbsp; &nbsp; ";return t},this.tab="basic"}const L=s("header",null,"证书详情",-1),B={key:0},P=["innerHTML"],$={class:"label-group"},A=["href"],S=["href"],z=["href"],D={class:"pre-box",style:{"font-family":"Menlo, Monaco, 'Courier New', monospace !important"}},F={style:{"margin-top":"1em"}},H=["href"],K={class:"pre-box",style:{"font-family":"Menlo, Monaco, 'Courier New', monospace !important"}},R={style:{"margin-top":"1em"}},Z=["href"],oe={__name:"certPopup",setup(p){const t=T(new M);return(c,h)=>(r(),d(C,null,{default:e(()=>[L,n(V,{modelValue:o(t).tab,"onUpdate:modelValue":h[0]||(h[0]=f=>o(t).tab=f)},{default:e(()=>[n(N,null,{default:e(()=>[n(y,{code:"basic"},{default:e(()=>[a("基本信息")]),_:1}),n(y,{code:"preview"},{default:e(()=>[a("预览")]),_:1})]),_:1}),n(I,null,{default:e(()=>[n(b,{code:"basic"},{default:e(()=>[n(v,{cols:"3"},{default:e(()=>[n(i,null,{name:e(()=>[a("证书说明")]),value:e(()=>[a(l(o(t).info.name),1)]),_:1}),o(t).info.description.length>0?(r(),d(i,{key:0},{name:e(()=>[a("详细说明")]),value:e(()=>[a(l(o(t).info.description),1)]),_:1})):u("",!0),n(i,null,{name:e(()=>[a("证书状态")]),value:e(()=>[o(t).info.isAvailable?(r(),d(m,{key:0,size:"small",outlined:"",class:"green"},{default:e(()=>[a("有效中")]),_:1})):(r(),d(m,{key:1,size:"small",class:"red"},{default:e(()=>[a("已过期")]),_:1}))]),_:1}),n(i,null,{name:e(()=>[a("发行信息")]),value:e(()=>[o(t).info.commonNames!=null?(r(),_("div",B,[(r(!0),_(g,null,k(o(t).info.commonNames,(f,w)=>(r(),_("div",null,[s("span",{innerHTML:o(t).indent(w)},null,8,P),a(l(f),1)]))),256))])):u("",!0)]),_:1}),n(i,{full:""},{name:e(()=>[a("域名")]),value:e(()=>[s("div",$,[(r(!0),_(g,null,k(o(t).info.dnsNames,f=>(r(),d(m,{outlined:""},{default:e(()=>[a(l(f),1)]),_:2},1024))),256))])]),_:1}),n(i,{full:""},{name:e(()=>[a("有效期")]),value:e(()=>[a(l(o(t).info.beginTime)+" - "+l(o(t).info.endTime),1)]),_:1}),n(i,{full:""},{name:e(()=>[a("证书文件下载")]),value:e(()=>[s("a",{href:"/servers/certs/downloadZip?certId="+o(t).info.id,target:"_blank"},"[ZIP下载]",8,A),a("   "),s("a",{href:"/servers/certs/downloadCert?certId="+o(t).info.id,target:"_blank"},"[证书下载]",8,S),a("   "),o(t).info.isCA?u("",!0):(r(),_("a",{key:0,href:"/servers/certs/downloadKey?certId="+o(t).info.id,target:"_blank"},"[私钥下载]",8,z))]),_:1})]),_:1})]),_:1}),n(b,{code:"preview"},{default:e(()=>[n(v,null,{default:e(()=>[n(i,{full:""},{name:e(()=>[a("证书预览")]),value:e(()=>[s("pre",D,l(o(t).info.certString),1),s("div",F,[s("a",{href:"/servers/certs/viewCert?certId="+o(t).info.id,target:"_blank"},"[浏览器新窗口打开]",8,H)])]),_:1}),o(t).info.isCA?u("",!0):(r(),d(i,{key:0,full:""},{name:e(()=>[a("私钥预览")]),value:e(()=>[s("pre",K,l(o(t).info.keyString),1),s("div",R,[s("a",{href:"/servers/certs/viewKey?certId="+o(t).info.id,target:"_blank"},"[浏览器新窗口打开]",8,Z)])]),_:1}))]),_:1})]),_:1})]),_:1})]),_:1},8,["modelValue"])]),_:1}))}};export{oe as default};
