import{s,c as a,q as e,v as t,x as l,e as i,B as o,z as r,y as n,N as u,D as d,C as m,aY as c,b1 as p,G as f}from"./base-lib.js?v=1761009159";import{u as y}from"./useController5.js?v=1761009159";import{u as v,ak as g,p as _}from"./utils-lib.js?v=1761009159";import{N as x,O as j}from"./useMethod5.js?v=1761009159";import"./__commonjsHelpers__.js?v=1761009159";import"./site.js?v=1761009159";import"./column.js?v=1761009159";import"./index106.js?v=1761009159";import"./useStore4.js?v=1761009159";import"./useController6.js?v=1761009159";import"./validator.js?v=1761009159";v();const{verifyingData:C,localRow:b}=s(y()),{setVerifyingLoading:k,setReinstallLoading:L}=y(),P=async()=>{var s;C.value.text="",k(!0);try{const{data:s}=await x({s_id:b.value.id});C.value.status=!0,g(s)&&(C.value.text=s.msg)}catch(a){C.value.status=!1,C.value.text=(null==(s=null==a?void 0:a.message)?void 0:s.result)||""}finally{k(!1)}},W=async()=>{await _({title:"重新安装WP",content:"这将重新安装WordPress核心文件而不会丢失站点内容。建议您在重新安装之前备份网站。",onConfirm:async()=>{C.value.text="",L(!0);const s=await j({s_id:b.value.id});g(s)&&(C.value.text=s.msg,C.value.status=!0,L(!1))}})},w={class:"p-[2rem]"},D=["innerHTML"],h={class:"flex justify-center"},H=a({__name:"index",setup(a){const{verifyingData:v,verifyingLoading:g,reinstallLoading:_}=s(y()),{resetVerifyingData:x}=y();return e(()=>{x()}),(s,a)=>{const e=c,y=p,x=f;return t(),l("div",w,[i(e,{type:"info",closable:!1,style:{"margin-bottom":"1.6rem"}},{default:o(()=>a[0]||(a[0]=[r("div",{class:"flex flex-col"},[r("span",null,"如果您怀疑此站点是由恶意软件感染的，请通过从WordPress.org验证其参考校验和来检查WordPress核心文件的完整性。"),r("span",null,"如果校验和不匹配，则可以快速重新安装WordPress核心文件而不影响您的网站内容。")],-1)])),_:1}),n(v).text?(t(),u(e,{key:0,type:n(v).status?"success":"error","show-icon":"",closable:!1},{default:o(()=>[r("span",{innerHTML:n(v).text},null,8,D)]),_:1},8,["type"])):d("",!0),i(y,{class:"my-[16px]"}),r("div",h,[i(x,{type:"primary",onClick:n(P),loading:n(g)},{default:o(()=>a[1]||(a[1]=[m("验证校验",-1)])),_:1,__:[1]},8,["onClick","loading"]),i(x,{style:{"margin-left":"7rem"},type:"info",onClick:n(W),loading:n(_)},{default:o(()=>a[2]||(a[2]=[m("重新安装WP",-1)])),_:1,__:[2]},8,["onClick","loading"])])])}}});export{H as default};
