2 lines
8.9 KiB
JavaScript
2 lines
8.9 KiB
JavaScript
System.register(["./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.js?v=1773287522785","./index-legacy-DgZ0-E4f.js?v=1773287522785","./index-legacy-DQdImDha.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785","./useTableColumns-legacy-DP6ypvsQ.js?v=1773287522785","./php-legacy-BZUQ59eS.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./index-legacy-BFkuWVH1.js?v=1773287522785","./leader-line-vue-legacy-D9GGZklw.js?v=1773287522785"],(function(e,l){"use strict";var a,t,n,i,s,o,u,d,r,c,p,v,x,f,_,g,m,b,w,y,h,S,P,$,k,j,C,I,H,N,V,U,B,z,E,O,T,A,L,D,F,R,Z,q,M,W,X,G,J,K,Q,Y,ee,le,ae;return{setters:[e=>{a=e._},e=>{t=e._},e=>{n=e._},e=>{i=e.f2,s=e.t,o=e.l,u=e.m,d=e.f3,r=e.z,c=e.c,p=e.h,v=e.aw,x=e._,f=e.p,_=e.i},e=>{g=e.k,m=e.e,b=e.r,w=e.$,y=e.Z,h=e.a0,S=e.a9,P=e.S,$=e._,k=e.aa,j=e.a6,C=e.R,I=e.o,H=e.n,N=e.b,V=e.j,U=e.X,B=e.c,z=e.w,E=e.ab,O=e.a8,T=e.F,A=e.ak},e=>{L=e.u},e=>{D=e.u},e=>{F=e.u},e=>{R=e.l,Z=e.m,q=e.n},e=>{M=e.a1,W=e.a6,X=e.k,G=e.e,J=e.a4,K=e.a3,Q=e.a8,Y=e.a0,ee=e.a9},e=>{le=e.u},e=>{ae=e.L}],execute:function(){var l=document.createElement("style");l.textContent=".border-view[data-v-79e877a1]{width:90%;border-width:1px;border-color:var(--color-border);border-radius:4px;border-style:solid;padding:12px}[data-v-94b73019] .n-spin-description{color:var(--color-primary)!important}\n/*$vite$:1*/",document.head.appendChild(l);const te={class:"p-16px"},ne=g({__name:"server-select",props:{callBack:{type:Function,default:()=>{}}},setup(e,{expose:l}){const t=e,s=m({webServer:"nginx"}),o=b([{label:"Nginx",value:"nginx"},{label:"Apache",value:"apache"},{label:"Openlitespeed",value:"openlitespeed"}]);return l({onConfirm:async()=>{await i({status:"disable",reserve:s.webServer}),t.callBack()}}),(e,l)=>{const t=W,i=M,u=a,d=n;return w(),y("div",te,[h(u,{class:"my-16px",model:P(s)},{default:S((()=>[h(i,{label:e.$t("Soft.Plugin.index_8")},{default:S((()=>[h(t,{class:"w-300px!",value:P(s).webServer,"onUpdate:value":l[0]||(l[0]=e=>P(s).webServer=e),options:P(o)},null,8,["value","options"])])),_:1},8,["label"])])),_:1},8,["model"]),h(d,null,{default:S((()=>[$("li",null,k(e.$t("Soft.Plugin.index_18")),1)])),_:1})])}}}),ie={class:"p-16px"},se={class:"border-view mb-20px",id:"nginx-select"},oe={class:"border-view",id:"proxy-select"},ue={class:"flex items-center my-20px"},de={class:"mr-10px"},re={class:"w-280px"},ce={class:"w-280px"},pe=c(g({__name:"version-select",setup(e,{expose:l}){const a=le(),{webserver:t}=j(a),{t:i}=C(),c=s(),p=b(1),v=b([{name:"Nginx",icon:"nginx",value:"1.24",version:[{label:"Nginx 1.24",value:"1.24"},{label:"Nginx 1.25",value:"1.25"},{label:"Nginx 1.26",value:"1.26"},{label:"Nginx 1.27",value:"1.27"},{label:"Nginx 1.28",value:"1.28"},{label:"Nginx 1.29",value:"1.29"}],disabled:!1},{name:"Apache",icon:"apache",value:"2.4",version:[{label:"Apache 2.4",value:"2.4"}],disabled:!1},{name:"Openlitespeed",icon:"openlitespeed",value:"1.8",version:[{label:"Openlitespeed 1.8",value:"1.8"}],disabled:!1}]);let x=null;return I((async()=>{await a.getPHPConfig(),await H(),v.value.forEach((e=>{e.icon===t.value&&(e.disabled=!0)})),setTimeout((()=>{(()=>{const e=document.getElementById("nginx-select"),l=document.getElementById("proxy-select");e&&l?x=ae.setLine(e,l,{color:"var(--color-border)",size:2,path:"grid",startSocket:"right",endSocket:"right"}):console.warn("Elements not found, will retry on mounted")})()}),500)})),N((()=>{x&&x.remove()})),l({onConfirm:async()=>{const e=u.loading(i("Home.Install.index_13"));try{const e=v.value.filter((e=>e.disabled));for(const l of v.value)e.includes(l)||await d({sName:l.icon,version:l.value,type:p.value,id:50,Skip:!0});await r(),c.getConfigSimple()}finally{e.close()}}}),(e,l)=>{const a=o,t=W,i=X,s=J,u=G,d=K,r=n;return w(),y("div",ie,[$("div",se,[h(i,{class:"flex-nowrap! items-center"},{default:S((()=>[h(a,{name:`soft-${P(v)[0].icon}`,size:"32"},null,8,["name"]),h(t,{value:P(v)[0].value,"onUpdate:value":l[0]||(l[0]=e=>P(v)[0].value=e),options:P(v)[0].version,disabled:P(v)[0].disabled},null,8,["value","options","disabled"])])),_:1})]),$("div",oe,[h(i,{class:"flex-nowrap! items-center"},{default:S((()=>[h(a,{name:`soft-${P(v)[1].icon}`,size:"32"},null,8,["name"]),h(t,{value:P(v)[1].value,"onUpdate:value":l[1]||(l[1]=e=>P(v)[1].value=e),options:P(v)[1].version,disabled:P(v)[1].disabled},null,8,["value","options","disabled"])])),_:1}),h(i,{class:"flex-nowrap! items-center mt-12px"},{default:S((()=>[h(a,{name:`soft-${P(v)[2].icon}`,size:"32"},null,8,["name"]),h(t,{value:P(v)[2].value,"onUpdate:value":l[2]||(l[2]=e=>P(v)[2].value=e),options:P(v)[2].version,disabled:P(v)[2].disabled},null,8,["value","options","disabled"])])),_:1})]),$("div",ue,[$("span",de,k(e.$t("Home.Install.index_4")),1),h(d,{value:P(p),"onUpdate:value":l[3]||(l[3]=e=>U(p)?p.value=e:null)},{default:S((()=>[h(u,{trigger:"hover"},{trigger:S((()=>[h(s,{value:1},{default:S((()=>[V(k(e.$t("Home.Install.index_5")),1)])),_:1})])),default:S((()=>[$("div",re,k(e.$t("Home.Install.index_6")),1)])),_:1}),h(u,{trigger:"hover"},{trigger:S((()=>[h(s,{value:0},{default:S((()=>[V(k(e.$t("Home.Install.index_7")),1)])),_:1})])),default:S((()=>[$("div",ce,k(e.$t("Home.Install.index_8")),1)])),_:1})])),_:1},8,["value"])]),h(r,{class:"mt-10px"},{default:S((()=>[$("li",null,k(e.$t("Soft.Plugin.index_19")),1)])),_:1})])}}}),[["__scopeId","data-v-79e877a1"]]),ve={class:"font-bold text-14px my-16px block"},xe=g({__name:"index",setup(e,{expose:l}){const{t:i}=C(),o=s(),{isMultiServiceInstall:u,taskCount:d}=j(o),r=b(!1),c=B((()=>d.value>0&&u.value)),g=m({phpValue:"nginx",wordpressValue:"nginx"}),I=B((()=>H.data.map((e=>({label:e.name,value:e.name}))))),{table:H,columns:N}=D([{key:"webserver",title:i("Soft.Plugin.index_8")},{key:"status",title:i("Soft.Plugin.index_9"),render:e=>h("span",{class:e.status?"text-primary":"text-error"},[e.status?i("Soft.Plugin.index_10"):i("Soft.Plugin.index_11")])},F({width:190,options:e=>[{label:i("Home.index_7"),onClick:()=>{p({title:i("Home.index_7"),content:i("The restart process will make the website inaccessible. Do you want to continue?"),onConfirm:async()=>{await v({name:e.name,type:"restart"})}})}},{label:i("Soft.Plugin.index_12"),onClick:()=>{G(e.name)}}]})]),U=async e=>{f(e?{title:i("Soft.Plugin.index_14"),width:400,footer:!0,component:pe}:{title:i("Soft.Plugin.index_13"),width:480,footer:!0,data:{callBack:()=>{te(),o.getConfigSimple()}},component:ne})},G=async e=>{p({title:i("Soft.Plugin.index_15"),content:i("Soft.Plugin.index_16"),onConfirm:async()=>{await R({server:e})}})},J=async e=>{await Z({default_php:e,default_wp:g.wordpressValue}),te()},K=async e=>{await Z({default_php:g.phpValue,default_wp:e}),te()},{loading:le,setLoading:ae}=L();z((()=>c.value),(e=>{e||te()}));const te=async()=>{try{ae(!0);const{message:e}=await q();_(e)&&(r.value=e.status,H.data=Object.entries(e).filter((([e])=>"status"!==e&&"default"!==e)).map((([e,l])=>({webserver:e.charAt(0).toUpperCase()+e.slice(1),name:e,status:l}))),g.phpValue=e.default.php,g.wordpressValue=e.default.wp)}finally{ae(!1)}};return te(),l({init:te}),(e,l)=>{const i=Q,s=X,o=E("i18n-t"),u=x,d=n,p=t,v=Y,f=W,_=M,m=a,b=ee;return w(),O(b,{show:P(le)||P(c),description:P(c)?e.$t("Soft.Plugin.index_2"):""},{default:S((()=>[h(s,{class:"items-center mt-10px"},{default:S((()=>[$("span",null,k(e.$t("Soft.Plugin.index_17")),1),h(i,{value:P(r),"onUpdate:value":U,disabled:P(c)},null,8,["value","disabled"])])),_:1}),h(d,{class:"my-16px"},{default:S((()=>[$("li",null,[V(k(e.$t("Soft.Plugin.index_3"))+" ",1),l[2]||(l[2]=$("span",{class:"text-warning"},"8188, 8189, 8190, 8288, 8289, 8290, 80, 443",-1))]),$("li",null,k(e.$t("Soft.Plugin.index_4")),1),$("li",null,k(e.$t("Soft.Plugin.index_5")),1),h(o,{keypath:"If one of the services fails to start, click {repair} to repair it",scope:"global",tag:"li"},{repair:S((()=>[$("b",null,k(e.$t("Public.Btn.Repair")),1)])),_:1}),$("li",null,[V(k(e.$t("Soft.Plugin.index_6")),1),h(u,{class:"ml-5px",target:"_blank",href:"https://www.yakpanel.com/docs/faq/multi-webserver_hosting.html"},{default:S((()=>[V(k(e.$t("Soft.Plugin.index_7")),1)])),_:1})])])),_:1}),P(r)?(w(),y(T,{key:0},[h(p,{data:P(H).data,columns:P(N),loading:P(le)},null,8,["data","columns","loading"]),$("div",null,[$("span",ve,k(e.$t("Set website default service")),1),h(v,{class:"my-16px!"}),h(m,{"label-width":"auto"},{default:S((()=>[h(_,{label:"PHP Project"},{default:S((()=>[h(f,{class:"w-150px",options:P(I),value:P(g).phpValue,"onUpdate:value":[l[0]||(l[0]=e=>P(g).phpValue=e),J]},null,8,["options","value"])])),_:1}),h(_,{label:"WP Toolkit"},{default:S((()=>[h(f,{class:"w-150px",options:P(I),value:P(g).wordpressValue,"onUpdate:value":[l[1]||(l[1]=e=>P(g).wordpressValue=e),K]},null,8,["options","value"])])),_:1})])),_:1})]),h(d,null,{default:S((()=>[$("li",null,k(e.$t("New websites will use the above services by default")),1)])),_:1})],64)):A("",!0)])),_:1},8,["show","description"])}}});e("O",c(xe,[["__scopeId","data-v-94b73019"]]))}}}));
|