import{l as a,a9 as s,_ as t}from"./utils-lib.js?v=20260328163632";import{A as e,B as l}from"./naive-ui.js?v=20260328163632";import{k as c,c as o,V as n,W as p,X as r,Z as m,j as i,Y as u,O as f,a1 as d,a3 as x}from"./base-lib.js?v=20260328163632";import"./__commonjsHelpers__.js?v=20260328163632";import"./env-lib.js?v=20260328163632";const D={class:"create-web-bg"},v={class:"flex items-center justify-center mb-16px"},y={class:"text-24px font-bold"},_={key:0,class:"create-info"},b={class:"flex w-full px-24px pt-16px"},g={class:"flex-1"},j={key:0,class:"flex flex-col"},q={class:"flex items-center"},S={class:"flex items-center"},h={key:1,class:"text-danger my-8px"},w={key:2,class:"flex justify-center items-center w-full h-full text-light font-bold"},k={class:"flex-1"},F={key:0,class:"text-danger my-8px"},P={key:1,class:"flex justify-center items-center w-full h-full text-light font-bold"},T={key:2,class:"flex flex-col"},C={key:0,class:"flex items-center"},W={class:"flex items-center"},z={class:"flex items-center"},A={class:"flex justify-center my-8px"},B=t(c({__name:"add-result",props:{compData:{default:()=>({ftp:!0,sql:!0,ftpStatus:!0,databaseStatus:!0,ftpData:{username:"",password:""},sqlData:{username:"",password:""},siteStatus:!0,site:{name:""},accessSite:"",record:{local_ip:"",rec_not_list:[],server_ip:""}})}},setup(t){const c=t;o((()=>{var a;if(null==(a=c.compData)?void 0:a.record){const{local_ip:a}=c.compData.record;return"echo ".concat(a," ").concat(c.compData.site.name," >> C:\\Windows\\System32\\drivers\\etc\\hosts")}return""})),o((()=>{var a,s;if(null==(a=c.compData)?void 0:a.record){const{server_ip:a,rec_not_list:t}=null==(s=c.compData)?void 0:s.record;return"echo ".concat(a," ").concat(t.join(" ")," >> /etc/hosts")}return""}));const B=()=>{const{ftp:t,ftpStatus:e,ftpData:l,sql:o,databaseStatus:n,sqlData:p}=c.compData,r=a("FTP账号资料")+"\n"+a("用户：")+l.username+"\n"+a("密码：")+l.password,m=a("数据库账号资料")+"\n"+a("数据库名：")+p.username+"\n"+a("用户：")+p.username+"\n"+a("密码：")+p.password;s({value:(t&&e?r:"")+(t&&e&&o&&n?"\n\n":"")+(o&&n?m:"")})};return(s,t)=>{const c=e,o=l;return n(),p("div",D,[r("div",v,[t[0]||(t[0]=r("i",{class:"svgtofont-el-success-filled text-primary mr-10px !text-30px"},null,-1)),r("span",y,m(s.compData.title),1)]),s.compData.ftp||s.compData.sql?(n(),p("div",_,[r("div",b,[r("div",g,[s.compData.ftp&&s.compData.ftpStatus?(n(),p("div",j,[i(m(u(a)("FTP账号资料"))+" ",1),f(c,{class:"!my-8px",dashed:!0}),r("span",q,[i(m(u(a)("用户："))+" ",1),r("strong",null,m(s.compData.ftpData.username),1)]),r("span",S,[i(m(u(a)("密码："))+" ",1),r("strong",null,m(s.compData.ftpData.password),1)])])):d("",!0),s.compData.ftp&&!s.compData.ftpStatus?(n(),p("div",h,m(u(a)("FTP账号添加失败！")),1)):s.compData.ftp?d("",!0):(n(),p("div",w,[t[1]||(t[1]=r("span",{class:"ftp-img"},null,-1)),r("span",null,m(u(a)("未创建FTP")),1)]))]),f(c,{vertical:"",class:"!h-66px !mx-24px"}),r("div",k,[s.compData.sql&&!s.compData.databaseStatus?(n(),p("div",F,m(u(a)("数据库添加失败！")),1)):s.compData.sql?d("",!0):(n(),p("div",P,[t[2]||(t[2]=r("span",{class:"sql-img"},null,-1)),r("span",null,m(u(a)("未创建数据库")),1)])),s.compData.sql&&s.compData.databaseStatus?(n(),p("div",T,[i(m(u(a)("数据库账号资料"))+" ",1),f(c,{class:"!my-8px",dashed:!0}),s.compData.siteStatus?(n(),p("span",C,[i(m(u(a)("数据库名："))+" ",1),r("strong",null,m(s.compData.sqlData.username),1)])):d("",!0),r("span",W,[i(m(u(a)("用户："))+" ",1),r("strong",null,m(s.compData.sqlData.username),1)]),r("span",z,[i(m(u(a)("密码："))+" ",1),r("strong",null,m(s.compData.sqlData.password),1)])])):d("",!0)])]),r("div",A,[f(o,{type:"primary",size:"small",onClick:B},{default:x((()=>[i(m(u(a)("一键复制"))+" ",1),t[3]||(t[3]=r("span",{class:"svgtofont-icon-copy text-14px ml-[4px]"},null,-1))])),_:1})])])):d("",!0)])}}}),[["__scopeId","data-v-350bd279"]]);export{B as default};
