2 lines
12 KiB
JavaScript
2 lines
12 KiB
JavaScript
System.register(["./index-legacy-DQdImDha.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BWPgT9-g.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-IFFYkvEY.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-CERfgfry.js?v=1773287522785","./useTableData-legacy-3kc3lnk4.js?v=1773287522785","./useTableColumns-legacy-DP6ypvsQ.js?v=1773287522785","./useLoading-legacy-IiShPpjk.js?v=1773287522785","./index-legacy-f8fFReRI.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-LjZ-8uGn.js?v=1773287522785","./vue-core-legacy-Cn1vuJ3s.js?v=1773287522785","./naive-ui-legacy-BW82sq8q.js?v=1773287522785","./index-legacy-DgZ0-E4f.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BtujQJPk.js?v=1773287522785","./prismjs-legacy-BN0FEcG9.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BQ2Kqzbl.js?v=1773287522785","./data-legacy-B9xdUIE5.js?v=1773287522785","./index-legacy-hh1mlQOF.js?v=1773287522785","./copy-legacy-CoXPjkKf.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-B9P08_gB.js?v=1773287522785","./index-legacy-BFkuWVH1.js?v=1773287522785","./index-legacy-DWPn48Vb.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BBkGleHZ.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BtQUnlS_.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-CvnE2rtV.js?v=1773287522785","./ssl-legacy-BRxc0DyI.js?v=1773287522785","./php-legacy-BZUQ59eS.js?v=1773287522785","./startOfToday-legacy-DOoXJ0xP.js?v=1773287522785","./index-legacy-sO5zj2jA.js?v=1773287522785","./index-legacy-DEYz4m3y.js?v=1773287522785","./index-legacy-cmihtUCN.js?v=1773287522785","./index-legacy-DaNJUJqN.js?v=1773287522785","./theme-monokai-legacy-fuYB_bfX.js?v=1773287522785","./ace-legacy-ConAV8RQ.js?v=1773287522785","./file-legacy-Bt6Hxu9s.js?v=1773287522785","./index-legacy-Cv0QQQJ6.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-5qdKE57s.js?v=1773287522785","./index-legacy-BJO1GMTD.js?v=1773287522785","./ssl-legacy-Do6tIt1-.js?v=1773287522785","./cert-legacy-Bgmq8Kqd.js?v=1773287522785","./ssl-lets-progress-legacy-CoWii-V7.js?v=1773287522785","./utils-legacy-QJQOPO7z.js?v=1773287522785","./index-legacy-EH0ptWew.js?v=1773287522785","./paypal-js-legacy-BkdHlEVO.js?v=1773287522785","./alarm-legacy-B0l3BTRO.js?v=1773287522785","./index.vue_vue_type_script_setup_true_lang-legacy-BCiDzEG_.js?v=1773287522785","./alarm-legacy-wcthH3Ek.js?v=1773287522785","./index-legacy-DGWsVoxN.js?v=1773287522785"],(function(e,t){"use strict";var l,a,n,s,i,o,r,u,c,d,p,y,_,m,v,g,h,f,x,w,j,b,k,C,$,U,P,R,S,T,D,A,L,q,z,I,V,B,F,O,W,Z,E,X,Y,G,H,J,K,M,N;return{setters:[e=>{l=e.t,a=e.z,n=e.p,s=e.h,i=e.i,o=e.v,r=e.aJ,u=e.l,c=e.x},e=>{d=e._},e=>{p=e._},e=>{y=e.U,_=e.V,m=e.W,v=e.X,g=e.Y,h=e.Z,f=e.c},e=>{x=e.u},e=>{w=e.u},e=>{j=e.u},e=>{b=e.g},e=>{k=e._},e=>{C=e.k,$=e.R,U=e.n,P=e.r,R=e.e,S=e.a0,T=e.j,D=e.$,A=e.Z,L=e.S,q=e.a9,z=e.X,I=e.c,V=e.aa,B=e._,F=e.w,O=e.a8,W=e.am,Z=e.u},e=>{E=e.a1,X=e.b,Y=e.a3,G=e.ag,H=e.k,J=e.B,K=e.o},e=>{M=e._},e=>{N=e._},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],execute:function(){const t={class:"p-20px"},Q=C({__name:"index",props:{data:{}},setup(e,{expose:l}){const{t:a}=$(),n=e,{onRefresh:s,tableData:i}=n.data;U((()=>{d.data=i}));const o=P(null),r=R({name:"",path:"",remark:""}),u={name:{required:!0,message:a("Virtual environment name cannot be empty"),trigger:["blur","input"]},path:{required:!0,message:a("Please select the environment source to create virtual environment"),trigger:"change"}},{keys:c,table:d,columns:_}=x([{type:"selection",width:40,multiple:!1},{key:"name",title:a("Site.TableRow.index_2")},{key:"type",title:a("Home.index_54"),render:e=>S("span",null,[b(e),T(" ")])},{key:"version",title:a("Python version")}]),m=e=>({style:"cursor: pointer;",onClick:()=>{c.value=[e.bin_path],r.path=e.bin_path,o.value?.validate()}});return l({onConfirm:async()=>{await(o.value?.validate());const e={venv_name:r.name,python_bin:r.path,ps:r.remark};await y(e),s()}}),(e,l)=>{const a=X,n=E,s=p,i=k;return D(),A("div",t,[S(i,{ref_key:"formRef",ref:o,model:L(r),rules:u},{default:q((()=>[S(n,{label:e.$t("Site.TableRow.index_2"),path:"name"},{default:q((()=>[S(a,{class:"w-250px!",value:L(r).name,"onUpdate:value":l[0]||(l[0]=e=>L(r).name=e),placeholder:e.$t("Virtual environment name")},null,8,["value","placeholder"])])),_:1},8,["label"]),S(n,{label:e.$t("Environment source"),path:"path"},{default:q((()=>[S(s,{"checked-row-keys":L(c),"onUpdate:checkedRowKeys":l[1]||(l[1]=e=>z(c)?c.value=e:null),"row-key":"bin_path",loading:L(d).loading,data:L(d).data,"max-height":220,columns:L(_),"row-props":m},null,8,["checked-row-keys","loading","data","columns"])])),_:1},8,["label"]),S(n,{label:e.$t("Security.Firewall.Port.index_26")},{default:q((()=>[S(a,{class:"w-250px!",value:L(r).remark,"onUpdate:value":l[2]||(l[2]=e=>L(r).remark=e),placeholder:e.$t("Security.Firewall.Port.index_26")},null,8,["value","placeholder"])])),_:1},8,["label"])])),_:1},8,["model"])])}}}),ee={class:"p-20px"},te=C({__name:"index",props:{data:{}},setup(e,{expose:t}){const{t:l}=$(),a=e,{onRefresh:n}=a.data,s=I((()=>1===o.type?l("Adding virtual environment requires specifying the virtual environment directory"):l("Adding system environment requires specifying the Python interpreter file"))),i=P(null),o=R({type:1,path:""}),r={path:{required:!0,message:l("Security.Conf.Index_28"),trigger:["blur","input"]}};return t({onConfirm:async()=>{await(i.value?.validate());const e={add_type:1===o.type?"venv":"system",path:o.path};await _(e),n()}}),(e,t)=>{const l=G,a=Y,n=E,u=N,c=k,d=M;return D(),A("div",ee,[S(c,{ref_key:"formRef",ref:i,model:L(o),rules:r},{default:q((()=>[S(n,{label:e.$t("Environment type")},{default:q((()=>[S(a,{value:L(o).type,"onUpdate:value":[t[0]||(t[0]=e=>L(o).type=e),t[1]||(t[1]=e=>L(o).path="")]},{default:q((()=>[S(l,{value:1},{default:q((()=>[T(V(e.$t("Virtual environment")),1)])),_:1}),S(l,{value:2},{default:q((()=>[T(V(e.$t("System environment")),1)])),_:1})])),_:1},8,["value"])])),_:1},8,["label"]),S(n,{label:e.$t("Location"),path:"path"},{default:q((()=>[S(u,{class:"w-400px",checkedType:1===L(o).type?["dir"]:["file"],value:L(o).path,"onUpdate:value":t[2]||(t[2]=e=>L(o).path=e),placeholder:L(s)},null,8,["checkedType","value","placeholder"])])),_:1},8,["label"])])),_:1},8,["model"]),S(d,null,{default:q((()=>[B("li",null,V(L(s)),1)])),_:1})])}}}),le=C({__name:"index",setup(e){const{t:t}=$(),o=l(),r=R({type:1}),u=()=>{s({title:t("Update version list"),content:t("Will fetch version list from mirror source, continue?"),onConfirm:()=>{f(!0)}})},{table:c,columns:y}=x([{key:"version",title:t("Site.TableRow.index_3")},{key:"is",title:t("Installation status"),render:e=>e.is_install?S("span",{class:"text-warning cursor-pointer",onClick:()=>a()},[T(" "),t("Soft.index_40"),T(" ")]):S("span",{class:e.installed?"text-primary":"text-error"},[T(" "),e.installed?t("WP.TableRow.index_14"):t("Docker.App.Install.index_8"),T(" ")])},w({options:e=>[{label:t("Public.Btn.Install"),show:!e.installed&&!e.is_install,onClick:()=>{const l=P("");n({title:`Install version[${e.version}]`,footer:!0,width:500,content:()=>S("div",{class:"p-20px"},[S(H,{class:"flex-nowrap! items-center!"},{default:()=>[S("span",null,[t("Custom parameters")]),S(X,{class:"w-300px!",value:l.value,"onUpdate:value":e=>l.value=e,placeholder:"Can be empty, example: --enable-optimizations"},null)]}),S(M,{class:"mt-16px"},{default:()=>[S("li",null,[t("When filling in, please do not add line breaks or other special symbols, which may cause the parameters to be invalid")]),S("li",null,[t("Multiple parameters should be separated by spaces")]),S("li",null,[t('The "--prefix" parameter has been used')]),S("li",null,[t("To verify whether the parameters are valid, you can check the installation log and search for the corresponding name")])]})]),onConfirm:async()=>{await m({version:e.version,extended:l.value}),a(),f()}})}},{label:t("Public.Btn.Uninstall"),show:e.installed&&!e.is_install,type:"error",onClick:()=>{s({title:t("Uninstall sdk"),content:t("Uninstall [{0}] will cause relevant projects to fail to run, are you sure you want to uninstall?",[e.version]),onConfirm:async()=>{await v({version:e.version}),f()}})}}]})]);F((()=>o.taskCount),(()=>{f()}));const{loading:_,setLoading:h}=j(),f=async(e=!1)=>{try{h(!0);const{message:t}=await g({force:e});i(t)&&(c.data=1===r.type?t.sdk.streamline:t.sdk.all)}finally{h(!1)}};return f(),(e,t)=>{const l=G,a=Y,n=J,s=p,i=d;return D(),O(i,{class:"p-16px"},{toolsLeft:q((()=>[S(a,{value:L(r).type,"onUpdate:value":[t[0]||(t[0]=e=>L(r).type=e),f]},{default:q((()=>[S(l,{value:1},{default:q((()=>[T(V(e.$t("Common version")),1)])),_:1}),S(l,{value:2},{default:q((()=>[T(V(e.$t("All version")),1)])),_:1})])),_:1},8,["value"])])),toolsRight:q((()=>[S(n,{onClick:u},{default:q((()=>[T(V(e.$t("Update version list")),1)])),_:1})])),table:q((()=>[S(s,{"max-height":400,loading:L(_),data:L(c).data,columns:L(y)},null,8,["loading","data","columns"])])),_:1})}}}),ae={class:"p-20px"};e("default",C({__name:"index",emits:["close"],setup(e,{expose:t,emit:l}){const{t:a}=$(),n=l,y=W(),_=o(a("Create virtual environment"),{onRefresh:()=>I()}),m=o(a("Adding environment"),{onRefresh:()=>I()}),v=o(a("Python version management")),g=()=>{_.data.tableData=U.data.filter((e=>e.can_create)),_.show=!0},k=()=>{m.show=!0},C=()=>{v.show=!0},{table:U,columns:P}=x([{key:"name",title:a("Site.TableRow.index_2"),width:"30%",ellipsis:{tooltip:{width:"trigger"}},render:e=>{let t;return S("span",null,[e.name,T(" "),S(K,{bordered:!1},(l=t=b(e),"function"==typeof l||"[object Object]"===Object.prototype.toString.call(l)&&!Z(l)?t:{default:()=>[t]}))]);var l}},{key:"version",title:a("Python version")},{key:"path",title:a("Parser location"),render:e=>S(u,{name:"base-dir",class:"cursor-pointer",size:"16",onClick:()=>{r("Path",e.bin_path),y.push("/files"),n("close")}},null)},{key:"remark",title:a("Using project"),ellipsis:{tooltip:{width:"trigger"}},render:e=>S("span",null,[e.project_name.join(",")||"-"])},{key:"remark",title:a("Security.Firewall.Port.form_11"),render:e=>S("span",null,[e.ps,"venv"===e.type?` [From ${e.system_data?.name}]`:""])},w({width:100,options:e=>[{label:a("Public.Btn.Del"),show:e.can_remove,onClick:()=>{s({title:a("Delete environment {0}",[e.name]),content:a("Deleting the environment will cause relevant projects to fail to run, are you sure you want to delete?"),onConfirm:async()=>{await h({path_data:e.bin_path}),I()}})}}]})]),{loading:R,setLoading:z}=j(),I=async()=>{try{z(!0);const{message:e}=await f({sort_not_use:0});i(e)&&(U.data=e.env_list)}finally{z(!1)}};return I(),t({init:I}),(e,t)=>{const l=J,a=p,n=d,s=c;return D(),A("div",ae,[S(n,null,{toolsLeft:q((()=>[S(l,{type:"primary",onClick:g},{default:q((()=>[T(V(e.$t("Create virtual environment")),1)])),_:1}),S(l,{onClick:k},{default:q((()=>[T(V(e.$t("Add environment")),1)])),_:1}),S(l,{onClick:C},{default:q((()=>[T(V(e.$t("Version management")),1)])),_:1})])),table:q((()=>[S(a,{"max-height":250,loading:L(R),data:L(U).data,columns:L(P)},null,8,["loading","data","columns"])])),_:1}),S(s,{show:L(_).show,"onUpdate:show":t[0]||(t[0]=e=>L(_).show=e),title:L(_).title,data:L(_).data,width:650,footer:!0,component:Q},null,8,["show","title","data"]),S(s,{show:L(m).show,"onUpdate:show":t[1]||(t[1]=e=>L(m).show=e),title:L(m).title,data:L(m).data,width:600,footer:!0,component:te},null,8,["show","title","data"]),S(s,{show:L(v).show,"onUpdate:show":t[2]||(t[2]=e=>L(v).show=e),title:L(v).title,data:L(v).data,width:500,component:le},null,8,["show","title","data"])])}}}))}}}));
|