← Back
Editing: index95.js
import{_ as e}from"./index103.js?v=VERSION_NUMBER";import{_ as a}from"./index.vue_vue_type_script_setup_true_lang6.js?v=VERSION_NUMBER";import{df as t,fP as s,L as o,a3 as n,N as i,x as l,fQ as r,bU as p,u,aj as c,p as d,K as m,n as _,aM as v,a6 as h,cu as w,a7 as b,a8 as g}from"./utils-lib.js?v=VERSION_NUMBER";import{j as f,r as P,k as C,g as L,n as k,s as y,e as E,B as j,c as x,q as R,v as S,x as O,A as T}from"./base-lib.js?v=VERSION_NUMBER";import{u as I,a as A,s as W,b as D,c as V,d as B}from"./useMethod5.js?v=VERSION_NUMBER";import{_ as M}from"./index104.js?v=VERSION_NUMBER";import{a as q,b as N,d as z,l as F,u as H,c as U}from"./column.js?v=VERSION_NUMBER";import{u as G,s as K,n as Q}from"./useController5.js?v=VERSION_NUMBER";import{u as J}from"./useStore4.js?v=VERSION_NUMBER";import{u as X}from"./useStore13.js?v=VERSION_NUMBER";const Y=f("WP-LOCAL-ADD-STORE",(()=>{const e=P("single"),a=C({domain:"",weblog_title:"",language:"zh_CN",php_version:null,wp_version:null,user_name:t(6),admin_password:s(16),pw_weak:!1,admin_email:"",Login_url:"wp-admin",redirection_url:"404",prefix:"wp_"+t(6)+"_",enable_cache:!1,wps:!1,datapassword:"",datauser:""}),u=C({method:1,bak_file:"",domain:"",sub_path:"",php_version:null,enable_cache:!1}),c=C({validatePasswordLength:"",validatePasswordMixedCaseCount:"",validatePasswordNumberCount:"",validatePasswordSpecialCharCount:"",status:"off"}),d=L((()=>u.domain?"/".concat(u.domain,"/"):"/")),m=P("/www/wwwroot"),_=P({setup:!0,version:"",status:!1}),v=P({setup:!0}),h=P({setup:!0,type:"",version:"",status:!1}),w=P([{label:"English",value:"en"},{label:"简体中文",value:"zh"}]),b=P([]),g=P([{label:"WordPress 5.8",value:"5.8"},{label:"WordPress 5.9",value:"5.9"}]),f=P(null),y=P(null),{loading:E,setLoading:j}=I(),{loading:x,setLoading:R}=I(),{loading:S,setLoading:O}=I();return{tabActive:e,addWordpressFormData:a,mysql:_,php:v,web:h,getConfig:async()=>{const{getPublicConfig:e}=await o((()=>import("./utils-lib.js?v=VERSION_NUMBER").then((e=>e.jE))),__vite__mapDeps([]),import.meta.url),{data:a}=await e();n(a)&&(v.value.setup=!!a.php.length,m.value=a.sites_path||"/www/wwwroot",n(a.web)&&(h.value=a.web),n(a.mysql)&&(_.value=a.mysql))},addSelectOption:w,selectLoading:E,getInitData:async()=>{try{j(!0),R(!0),O(!0);const{getLanguageList:e,getWpVersionList:t}=await o((()=>import("./useMethod5.js?v=VERSION_NUMBER").then((e=>e.a4))),__vite__mapDeps([]),import.meta.url),{GetPHPVersion:s}=await o((()=>import("./site.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url),{getDatabasePasswordConfig:p}=await o((()=>import("./database.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url),{data:{msg:u}}=await e();n(u)&&(w.value=Object.entries(u).map((([e,a])=>({label:a,value:e}))));const{data:d}=await s();if(i(d)&&(b.value=d.reverse().filter((e=>"00"!==e.version)).map((e=>({label:e.name,value:e.version}))),await k(),d.length>0)){const e=d[0].version;a.php_version="00"===e?"":e||null}const{data:{msg:m}}=await t({php_version_short:a.php_version||""});i(m)&&(g.value=m.map((e=>({label:e.version,value:e.version}))),await k(),m.length>0&&(a.wp_version=m[0].version||""));const{data:_}=await p();"off"===(null==_?void 0:_.status)?(a.datapassword=l(16),c.status=_.status||""):(c.validatePasswordLength=_.validate_password_length||"",c.validatePasswordMixedCaseCount=_.validate_password_mixed_case_count||"",c.validatePasswordNumberCount=_.validate_password_number_count||"",c.validatePasswordSpecialCharCount=_.validate_password_special_char_count||"",c.status=_.status||"",a.datapassword=r(c))}finally{j(!1),R(!1),O(!1)}},addPHPSelectOption:b,addWPSelectOption:g,domainPath:d,sitePath:m,addBackupFormData:u,phpLoading:x,wpLoading:S,setWpLoading:O,createSiteSubmit:f,createImportSubmit:y,resetCreateForm:()=>{a.domain="",a.weblog_title="",a.language="zh_CN",a.php_version=null,a.wp_version=null,a.user_name=t(6),a.admin_password=p(16,"wp"),a.pw_weak=!1,a.admin_email="",a.Login_url="wp-admin",a.redirection_url="404",a.prefix="wp_"+t(6)+"_",a.enable_cache=!1,a.wps=!1,a.datauser="",a.datapassword="",c.validatePasswordLength="",c.validatePasswordMixedCaseCount="",c.validatePasswordNumberCount="",c.validatePasswordSpecialCharCount="",c.status="off"},resetImportForm:()=>{u.method=1,u.bak_file="",u.domain="",u.sub_path="",u.php_version=null,u.enable_cache=!1},passwordConfig:c}})),Z=f("WP-Wordpress-Setting-STORE",(()=>{const e=P("setup"),a=C({Login_url:"",redirection_url:"",wps:!1,admin_email:"",home_url:""}),{loading:t,setLoading:s}=I(),o=P(!1),n=P("--"),i=P("--"),l=L((()=>o.value?"有一个新版本 (".concat(i.value,") 可用于更新"):"WordPress ".concat(n.value," 已经是最新版本"))),r=P([]),p=P(!1),u=P(null),c=P("zh_CN"),d=P(""),m=P("--"),_=P(!1),v=P(!1),h=P(!1),w=P(!1);return{tabActive:e,form:a,isUpdate:o,currentVersion:n,updateVersion:i,versionText:l,isCache:p,username:u,language:c,password:d,login_url:m,isRefreshPluginList:_,isRefreshThemeList:h,isRefreshPluginInstall:v,isRefreshThemeInstall:w,loading:t,setLoading:s,siteLanguageOption:r}})),{localRow:$,loginUrl:ee,isRefreshLocalList:ae,cloneLocalForm:te}=y(G());u();const{siteInfo:se,siteType:oe}=J(),{createSiteSubmit:ne,tabActive:ie,createImportSubmit:le}=y(Y()),{tabActive:re}=y(X()),{tabActive:pe}=y(Z()),ue=()=>{window.open(ee.value,"_blank","noopener,noreferrer")},ce=()=>{D($.value.id,"local")},de=async e=>{_({title:"删除站点确认",component:()=>o((()=>import("./index215.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url),area:"auto",compData:e})},me=async(e,a,t,s)=>{const{label:o,value:n}=s,i=new Map([["start","批量启用选中的站点后,站点将恢复正常访问"],["stop","批量停用选中的站点后,站点将无法正常访问,用户访问会显示当前网站停用后的提示页"],["backSite","批量备份选中的站点,可能耗费时间较长"]]),l=async(e,a)=>{const t=new Map([["backSite",B]]),{id:s,name:o,project_config:i}=e;null==i||i.type;const l=t.get(n);if("backSite"===n)if(l)return l({s_id:s,bak_type:3})};await e({title:"批量".concat(o),content:"".concat(i.get(n),",是否继续操作?"),column:[{label:"网站名",prop:"rname"},U()],onConfirm:async()=>(await a(l),ae.value=!0,!1)})},_e=(e,a="domain")=>{$.value=e,se.value=e,oe.value="php",re.value=a,_({title:"站点修改【".concat(e.name,"】 -- 添加时间【").concat(e.addtime,"】"),area:[84,70],component:()=>o((()=>import("./index408.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})},ve=x({__name:"index",setup(t){const{isRefreshLocalList:s}=y(G()),{mainHeight:i}=u(),{BtOperation:l}=v({options:[{type:"button",label:"添加 Wordpress",active:!0,onClick:()=>{_({title:"添加站点",btn:!0,area:60,component:()=>o((()=>import("./index400.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url),onConfirm:async()=>{try{"single"===ie.value?ne.value&&await ne.value():le.value&&await le.value()}catch(e){return!1}}})}},{type:"button",label:"迁移站点",onClick:()=>{_({title:"迁移站点",area:60,component:()=>o((()=>import("./index401.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})}},{type:"button",label:"WP 套件",onClick:()=>{_({title:"WP 套件",area:60,component:()=>o((()=>import("./index402.js?v=VERSION_NUMBER").then((e=>e.i))),__vite__mapDeps([]),import.meta.url)})}}]}),r=g([{label:"启动站点",value:"start",event:K},{label:"停用站点",value:"stop",event:K},{label:"备份站点",value:"backSite",event:me},{label:"删除站点",value:"delete",event:async(e,a,t,s)=>{Q(t.value)}}]),{BtTable:p,BtPage:f,BtRecommendSearch:P,BtRefresh:C,BtColumn:L,BtBatch:k,BtTableCategory:x,BtErrorMask:I,tableRef:D,classList:B,refresh:U}=h({request:e=>(async e=>{try{const{data:{data:a,page:t,search_history:s,error:o}}=await A({...e,table:"sites",project_type:"WP2"});return{data:a,total:c(t),other:{search_history:s,error:o}}}catch(a){return{data:[],total:0,other:{search_history:[]}}}})(e),columns:[q(),{label:"网站名",minWidth:180,isCustom:!0,showOverflowTooltip:!0,prop:"name",render:e=>E("span",{class:"bt-link",onClick:()=>{$.value=e,se.value=e,oe.value="php",_e(e,"domain")}},[e.name])},N({width:100,event:async e=>{await d({title:"".concat("0"===e.status?"开启":"暂定"," 网站 【").concat(e.name,"】"),content:"".concat("0"===e.status?"即将开启此网站,您确定继续吗?":"关闭网站时无法访问,您确定继续吗?"),onConfirm:async()=>{await m({loading:"正在操作中,请稍后...",message:!0,request:W("0"===e.status,{id:e.id,name:e.name}),success:e=>{e.status&&(ae.value=!0)}})}})},data:["已停用","已启用"]}),{label:"备份",minWidth:80,isCustom:!0,prop:"backup_count",render:e=>E("span",{class:"bt-link",onClick:()=>{$.value=e,_({title:"网站备份数据【".concat(e.name,"】"),area:85,component:()=>o((()=>import("./index403.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})},style:e.backup_count>0?"":"color:#f0ad4e !important"},[e.backup_count>0?"有备份(".concat(e.backup_count,")"):"点击备份"])},z({prop:"path",minWidth:120,width:200}),F({label:"缓存",prop:"cache_status",size:"small",event:(e,a)=>{m({loading:"".concat(e?"开启":"关闭","缓存中,请稍候..."),message:!0,request:V({version:a.php_version,sitename:a.name,act:e?"enable":"disable"}),success:e=>{e.status||(a.cache_status=!a.cache_status)}})}}),H((e=>[{onClick:()=>{pe.value="setup",_e(e,"wordpress")},title:"00"==e.wp_version?"Static":e.wp_version},{onClick:()=>{$.value=e,te.value.cache_status=e.cache_status,_({title:"克隆网站",btn:!0,area:60,component:()=>o((()=>import("./index404.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})},title:"克隆"},{onClick:()=>{pe.value="plugin",_e(e,"wordpress")},title:"插件"},{onClick:()=>{pe.value="theme",_e(e,"wordpress")},title:"主题"},{onClick:()=>{$.value=e,_({title:"安全工具【".concat(e.name,"】"),area:60,component:()=>o((()=>import("./index405.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})},title:"保护"},{onClick:()=>{$.value=e,_({title:"检查WordPress完整性【".concat(e.name,"】"),area:60,component:()=>o((()=>import("./index406.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})},title:"完整性检查"}]),{label:"WP 设置",fixed:!1,width:350}),{label:"PHP",isCustom:!0,width:100,minWidth:100,render:e=>{let a=!e.php_version_status;return E("span",{class:"cursor-pointer "+(a&&"静态"!==e.php_version?"bt-warn":"bt-link"),onClick:()=>_e(e,"php")},[a&&"静态"!==e.php_version?e.php_version+"[未安装]":"其它"==e.php_version?"自定义":e.php_version])}},{label:"SSL",minWidth:100,isCustom:!0,prop:"ssl",render:e=>{const{ssl:a}=e;return n(a)?E("span",{class:"bt-link",style:a.endtime<0?"color:#ef0808 !important":"",onClick:()=>{_e(e,"ssl")}},[a.endtime<0?"已过期":"在".concat(a.endtime,"天内到期")]):E("span",{class:"bt-link",style:"color:#f0ad4e !important",onClick:()=>{_e(e,"ssl")}},[j("未设置")])}},H((e=>[{title:"登录",render:()=>E("div",{class:"inline-block"},["0"==e.status?E("span",{class:"text-[#999]",style:"cursor:not-allowed"},[j("登录")]):E("span",{class:"bt-link",onClick:()=>{$.value=e,_({title:"WP登录",area:42,component:()=>o((()=>import("./index407.js?v=VERSION_NUMBER")),__vite__mapDeps([]),import.meta.url)})}},[j("登录")]),E(M,null,null)])},{onClick:()=>{_e(e)},title:"设置"},{onClick:e=>{$.value=e,de(e)},title:"删除"}]),{fixed:"right",width:150,label:"操作"})],extension:[w("search",{name:"wp",list:[],showHistory:!1,showRecommend:!1}),r,b(s)]});return(t,s)=>{const o=e;return R(),S("div",null,[E(a,{ref:"envRef",onInit:O(U)},null,8,["onInit"]),E(o,null,{"header-left":T((()=>[E(O(l))])),"header-right":T((()=>[E(O(P),{type:"remote-wp",placeholder:"请输入域名",class:"!w-[270px] mr-[10px]"})])),content:T((()=>[E(O(p),{"min-height":O(i)},null,8,["min-height"])])),"footer-left":T((()=>[E(O(k))])),"footer-right":T((()=>[E(O(f))])),_:1})])}}}),he=Object.freeze(Object.defineProperty({__proto__:null,default:ve},Symbol.toStringTag,{value:"Module"}));export{ue as a,Z as b,he as i,ce as o,Y as u}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { __vite__mapDeps.viteFileDeps = [] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) }
Save File
Cancel