mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2026-01-25 12:38:10 +00:00
2 lines
27 KiB
JavaScript
2 lines
27 KiB
JavaScript
import{d as Il,f as Tl,v as Al,r,au as We,j as Vl,O as El,ae as Bl,l as Ye,k as t,M as re,h as u,c as f,a as s,e,w as l,t as d,u as i,A as Sl,n as ce,B as x,J as Y,i as _,a7 as pe,m as b,F as S,aI as Rl,S as Z,bs as Fl,bq as Ze,bt as Ll,bu as $l,aT as Dl,a3 as Xe,W as el,bv as Ml,bw as jl,a2 as X,bx as Nl,by as Ol,bz as zl,bA as Pl,P as Kl,D as ql,E as Hl,Y as Ql,C as Jl,a4 as Gl,av as Wl,Z as Yl,U as Zl,br as Xl,Q as et,G as lt,K as tt,H as at,R as st,am as nt,an as ot,ao as it,ap as dt,a1 as ut,aU as rt,ax as ct,L as pt,p as ft,g as _t}from"./index-08dd4327.js";/* empty css *//* empty css */import{T as vt,_ as mt}from"./vue-web-terminal-7390c8d8.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./el-form-item-4ed993c7.js";/* empty css *//* empty css */import{_ as fe}from"./apply_empty-6a5331b2.js";/* empty css *//* empty css *//* empty css */import"./el-tooltip-4ed993c7.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import{_ as ht}from"./icon-addon-339e16d0.js";import{d as xt}from"./tools-0c38986e.js";import{g as ll,d as gt,s as yt}from"./module-1c44d4d9.js";/* empty css */import bt from"./index-35617634.js";import kt from"./index-1ed19934.js";import wt from"./index-447dab65.js";import{_ as Ct}from"./_plugin-vue_export-helper-c27b6911.js";import"./upgrade-0833b188.js";/* empty css *//* empty css */const A=ee=>(ft("data-v-561a782c"),ee=ee(),_t(),ee),Ut={class:"main-container"},It={class:"flex justify-between items-center"},Tt={class:"text-page-title"},At={class:"flex justify-between items-center my-[20px]"},Vt={class:"flex"},Et={key:0,class:"w-[9px] h-[9px] bg-[#FF0000]",style:{position:"absolute","border-radius":"50%",right:"5px",top:"-5px"}},Bt={class:"flex items-center cursor-pointer"},St=A(()=>s("div",{class:"flex items-center w-full h-full"},[s("img",{class:"max-w-full max-h-full",src:ht,alt:""})],-1)),Rt={class:"flex-1 w-0 flex flex-col justify-center pl-[20px] font-500 text-[13px]"},Ft={class:"w-[236px] truncate leading-[18px]"},Lt={key:0,class:"w-[236px] truncate leading-[18px] mt-[6px]"},$t={key:1,class:"w-[236px] truncate leading-[18px] mt-[6px]"},Dt={class:"mt-[3px] flex flex-nowrap"},Mt={class:"flex items-center"},jt={class:"font-500 text-[13px] mr-[5px]"},Nt={class:"font-500 text-[13px]"},Ot={class:"font-500 text-[13px] multi-hidden"},zt={class:"font-500 text-[13px]"},Pt={class:"font-500 text-[13px]"},Kt={key:1,class:"data-loading"},qt=A(()=>s("span",null,null,-1)),Ht={key:0,class:"h-[100px]"},Qt=A(()=>s("div",{class:"w-[230px] mx-auto"},[s("img",{src:fe,class:"max-w-full",alt:""})],-1)),Jt={class:"flex items-center"},Gt=A(()=>s("div",{class:"w-[230px] mx-auto"},[s("img",{src:fe,class:"max-w-full",alt:""})],-1)),Wt={class:"flex items-center"},Yt={key:4,class:"mx-auto overview-empty flex flex-col items-center pt-14 pb-6"},Zt=A(()=>s("div",{class:"mb-[20px] text-sm text-[#888]"},"检测到当前账号尚未绑定授权,请先绑定授权!",-1)),Xt={class:"flex flex-1 flex-wrap justify-center relative"},ea={class:"px-[18px] py-[8px]"},la=A(()=>s("p",{class:"leading-[32px] text-[14px]"},"您在官方应用市场购买任意一款应用,即可获得授权码。输入正确授权码认证通过后,即可支持在线升级和其它相关服务",-1)),ta={class:"flex justify-end mt-[36px]"},aa=A(()=>s("div",{class:"w-[230px] mx-auto"},[s("img",{src:fe,class:"max-w-full",alt:""})],-1)),sa={class:"flex items-center"},na=A(()=>s("div",{class:"w-[230px] mx-auto"},[s("img",{src:fe,class:"max-w-full",alt:""})],-1)),oa={class:"flex items-center"},ia={class:"mt-[20px]"},da={class:"text-sm mt-[10px] text-info"},ua={class:"mt-[20px]"},ra={class:"mt-[10px] text-right"},ca={class:"input-width"},pa={class:"input-width"},fa={class:"input-width"},_a={class:"input-width"},va={class:"dialog-footer"},ma={class:"min-h-[150px]"},ha={key:0,class:"my-3"},xa={class:"pt-[20px] pl-[20px]"},ga={class:"px-[20px] pt-[10px] text-[14px]"},ya={key:0},ba={key:1},ka={key:0},wa={key:1},Ca={class:"flex justify-end"},Ua={class:"h-[50vh] mt-[20px]"},Ia={class:"h-[50vh] mt-[20px] flex flex-col"},Ta={class:"min-h-[150px]"},Aa={key:0,class:"bg-[#fff] my-3"},Va={class:"pt-[20px] pl-[20px]"},Ea={class:"px-[20px] pt-[10px] text-[14px]"},Ba={key:0},Sa={key:1},Ra={key:0},Fa={key:1},La=A(()=>s("span",null,"本地已经存在该插件/应用,再次下载会覆盖该插件/应用。",-1)),$a={class:"dialog-footer"},Da=Il({__name:"store",setup(ee){Tl();const Ue=Al(),m=r(We.get("storeActiveName")||"installed"),_e=r(null),K=r(null),k=r(!0),R=r(""),ve=r([]),le=Vl(),q=r(!1),F=r(null),Ie=r(""),Te=r(null);El().then(n=>{Ie.value=n.data.version.version});const Ae=r(),tl=()=>{Ve(Ae.value,!0)},L=n=>{m.value=n,We.set({key:"storeActiveName",data:n})};Ue.query.id&&L(Ue.query.id);const Ve=(n,a=!1)=>{if(n.is_download&&m.value=="all"&&!a)return q.value=!0,Ae.value=n,!1;R.value||(R.value=n.key,gt({addon:n.key,version:n.version}).then(()=>{q.value=!1,Se(n.key),B(),R.value=""}).catch(()=>{R.value=""}))},me=r("");ll().then(n=>{n.data.data&&n.data.data.auth_code&&(me.value=n.data.data.auth_code)});const V=r(""),T=r({installed:[],uninstalled:[],all:[],recentlyUpdated:[]}),he=()=>{if(V.value==""||V.value==null)return T.value.installed=p.value.installed,T.value.uninstalled=p.value.uninstalled,T.value.all=p.value.all,T.value.recentlyUpdated=p.value.recentlyUpdated,!1;T.value.installed=p.value.installed.filter(n=>n.title.indexOf(V.value)!=-1),T.value.uninstalled=p.value.uninstalled.filter(n=>n.title.indexOf(V.value)!=-1),T.value.all=p.value.all.filter(n=>n.title.indexOf(V.value)!=-1),T.value.recentlyUpdated=p.value.recentlyUpdated.filter(n=>n.title.indexOf(V.value)!=-1)},p=r({installed:[],uninstalled:[],all:[],recentlyUpdated:[],error:""}),B=()=>{k.value=!0,Fl({}).then(n=>{var g;const a=n.data.list;p.value.error=n.data.error,p.value.installed=[],p.value.uninstalled=[],p.value.all=[],p.value.recentlyUpdated=[];for(const c in a)a[c].is_local==!1&&p.value.all.push(a[c]),a[c].install_info&&((g=Object.keys(a[c].install_info))!=null&&g.length)?(p.value.installed.push(a[c]),a[c].install_info.version!=a[c].version&&p.value.recentlyUpdated.push(a[c])):a[c].is_download==!0&&p.value.uninstalled.push(a[c]);he(),le.routers.forEach((c,J)=>{c.children&&c.children.length?(c.name=Ze(c.children),Ee.value[c.meta.app]=Ze(c.children)):Ee.value[c.meta.app]=c.name}),k.value=!1}).catch(()=>{k.value=!1})};B();const Ee=r({}),E=r(""),$=r(!1),C=r(1),U=r({});let xe=null;const Be=new vt,al=(n,a,g,c,J)=>{if(a=="开始安装插件"){g(Be);const v=sl(["/","——","\\","|"]);xe=setInterval(()=>{Be.flush("> "+v.next().value)},150)}};function sl(n){let a=0;return{next(){return a+1==n.length&&(a=0),{value:n[a++]}}}}const Se=n=>{E.value=n,Ll(n).then(a=>{C.value=1,$.value=!0,ve.value=[],U.value=a.data,le.clearRouters()})};let H=null;const ge=(n=!0)=>{$l().then(a=>{if(a.data){if(n&&(ye=[],E.value=a.data.addon,$.value||(H=Dl.success({title:t("warning"),dangerouslyUseHTMLString:!0,message:Xe("div",{},[t("installingTips"),Xe("span",{class:"text-primary cursor-pointer",onClick:nl},[t("installPercent")])]),duration:0,showClose:!1}))),a.data.error){el({message:"插件安装失败",type:"error",duration:5e3});return}a.data.mode=="cloud"&&dl(),setTimeout(()=>{ge(!1)},2e3)}else n||(C.value=3,B(),le.clearRouters(),H.close())}).catch(a=>{F.value.pushMessage({content:a.message,class:"error"})})};ge();const nl=()=>{$.value=!0,C.value=2},D=r(!1),ol=()=>{!U.value.is_pass||D.value||(D.value=!0,Ml({addon:E.value}).then(n=>{C.value=3,B(),D.value=!1,n.data.length&&(ve.value=n.data)}).catch(n=>{D.value=!1}))},M=r(!1),il=()=>{if(!me.value){Re();return}!U.value.is_pass||M.value||(M.value=!0,jl({addon:E.value}).then(n=>{C.value=2,F.value.execute("clear"),F.value.execute("开始安装插件"),ge(),M.value=!1}).catch(n=>{M.value=!1}))},Re=()=>{X.confirm(t("authTips"),t("warning"),{distinguishCancelAndClose:!0,confirmButtonText:t("toBind"),cancelButtonText:t("toNiucloud")}).then(()=>{je()}).catch(n=>{n==="cancel"&&window.open("https://www.niucloud.com/app")})};let ye=[];const dl=()=>{Nl(E.value).then(n=>{const a=n.data.data??[];a[0]&&a[0].length&&$.value==!0&&a[0].forEach(g=>{ye.includes(g.action)||(F.value.pushMessage({content:`${g.action}`}),ye.push(g.action),g.code==0&&F.value.pushMessage({content:g.msg,class:"error"}))})}).catch(()=>{H==null||H.close()})};Bl(E,n=>{U.value={}});const be=r(!1),te=r({}),ul=n=>{X.confirm(t("uninstallTips"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{rl(n)})},Fe=n=>{var a;(a=_e.value)==null||a.open(n)},Le=()=>{var n;if(!me.value){Re();return}if(K.value.cloudBuildTask){(n=K.value)==null||n.open();return}X.confirm(t("cloudBuildTips"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{var a;(a=K.value)==null||a.open()})},rl=n=>{Ol(n).then(({data:a})=>{a.is_pass?zl({addon:n}).then(g=>{B(),le.clearRouters(),k.value=!1}).catch(()=>{k.value=!1}):(te.value=a,be.value=!0)})},$e=()=>{window.open("https://www.niucloud.com/app")},cl=n=>{C.value==2?X.confirm(t("installShowDialogCloseTips"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{Pl(E.value),n()}):C.value==3?(L("installed"),location.reload()):n(),xe&&clearInterval(xe)},ae=r(!1),j=r({}),pl=n=>{ae.value=!0,j.value=n},De=r(""),fl=n=>{var a;De.value=n.key,(a=Te.value)==null||a.open()},se=r(!1),ne=r(""),Me=r(null),Q=r(!1),I=r(!0);(()=>{I.value=!0,ll().then(n=>{I.value=!1,n.data.data&&n.data.data.length!=0&&(ne.value=n.data.data)}).catch(()=>{I.value=!1,se.value=!1})})();const je=()=>{se.value=!0},N=Ye({auth_code:"",auth_secret:""}),ke=r(),_l=Ye({auth_code:[{required:!0,message:t("authCodePlaceholder"),trigger:"blur"}],auth_secret:[{required:!0,message:t("authSecretPlaceholder"),trigger:"blur"}]}),vl=async n=>{Q.value||!n||await n.validate(async a=>{a&&(Q.value=!0,yt(N).then(()=>{Q.value=!1,setTimeout(()=>{location.reload()},1e3)}).catch(()=>{Q.value=!1}))})},Ne=()=>{window.open("https://www.niucloud.com/app")},ml=n=>{X.confirm(t("deleteAddonTips"),t("warning"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{xt(n).then(()=>{B()})})},hl=n=>{if(!n.support_version)return!0;const a=n.support_version.split("."),g=Ie.value.split(".");return parseFloat(`${a[0]}.${a[1]}`)<parseFloat(`${g[0]}.${g[1]}`)};let we=[];const xl=n=>{we=n.map(a=>a.key)},gl=()=>{if(!we.length){el({message:"请先勾选要升级的插件",type:"error",duration:5e3});return}Fe(we.toString())};return(n,a)=>{const g=re("search"),c=Kl,J=ql,v=Hl,w=Ql,yl=Jl,Oe=Gl,oe=Wl,bl=re("QuestionFilled"),ze=Yl,ie=Zl,Pe=Xl,kl=et,O=lt,Ke=tt,qe=at,G=st,Ce=nt,wl=ot,h=it,z=dt,de=re("Select"),ue=re("CloseBold"),He=ut,Cl=rt,Ul=ct,Qe=pt;return u(),f(S,null,[s("div",Ut,[e(Ke,{class:"box-card !border-none",shadow:"never"},{default:l(()=>{var Je,Ge;return[s("div",It,[s("span",Tt,d(i(t)("localAppText")),1),e(J,{class:"!w-[250px]",placeholder:i(t)("search"),modelValue:V.value,"onUpdate:modelValue":a[0]||(a[0]=o=>V.value=o),modelModifiers:{trim:!0},onKeyup:Sl(he,["enter"])},{suffix:l(()=>[e(c,{class:"el-input__icon cursor-pointer",size:"14px",onClick:he},{default:l(()=>[e(g)]),_:1})]),_:1},8,["placeholder","modelValue","onKeyup"])]),s("div",At,[s("div",Vt,[s("div",{class:ce(["flex items-center text-[14px] h-[32px] border-[1px] border-solid my-[3px] border-[var(--el-color-info-light-8)] rounded-full px-[20px] mr-[24px] cursor-pointer hover:bg-[var(--el-color-info-light-8)]",{"!text-[#fff] !bg-[#000] !border-[#000]":m.value==="installed"}]),onClick:a[1]||(a[1]=o=>L("installed"))},d(i(t)("installLabel")),3),s("div",{class:ce(["flex items-center text-[14px] h-[32px] border-[1px] border-solid my-[3px] border-[var(--el-color-info-light-8)] rounded-full px-[20px] mr-[24px] cursor-pointer hover:bg-[var(--el-color-info-light-8)]",{"!text-[#fff] !bg-[#000] !border-[#000]":m.value==="uninstalled"}]),onClick:a[2]||(a[2]=o=>L("uninstalled"))},d(i(t)("uninstalledLabel")),3),s("div",{class:ce(["flex items-center text-[14px] h-[32px] border-[1px] border-solid my-[3px] border-[var(--el-color-info-light-8)] rounded-full px-[20px] mr-[24px] cursor-pointer hover:bg-[var(--el-color-info-light-8)]",{"!text-[#fff] !bg-[#000] !border-[#000]":m.value==="all"}]),onClick:a[3]||(a[3]=o=>L("all"))},d(i(t)("buyLabel")),3),s("div",{class:ce(["relative flex items-center text-[14px] h-[32px] border-[1px] border-solid my-[3px] border-[var(--el-color-info-light-8)] rounded-full px-[20px] mr-[24px] cursor-pointer hover:bg-[var(--el-color-info-light-8)]",{"!text-[#fff] !bg-[#000] !border-[#000]":m.value==="recentlyUpdated"}]),onClick:a[4]||(a[4]=o=>L("recentlyUpdated"))},[p.value.recentlyUpdated.length>0?(u(),f("span",Et)):x("",!0),s("span",null,d(i(t)("recentlyUpdated")),1)],2)]),s("div",null,[Y(e(v,{type:"primary",round:"",onClick:gl,loading:(Je=_e.value)==null?void 0:Je.loading,disabled:I.value},{default:l(()=>[_(d(i(t)("batchUpgrade")),1)]),_:1},8,["loading","disabled"]),[[pe,m.value==="recentlyUpdated"]]),e(v,{type:"primary",round:"",onClick:Le,loading:(Ge=K.value)==null?void 0:Ge.loading,disabled:I.value},{default:l(()=>[_(d(i(t)("cloudBuild")),1)]),_:1},8,["loading","disabled"])])]),s("div",null,[p.value[m.value].length&&!k.value?(u(),b(ze,{key:0,data:T.value[m.value],size:"large",class:"pt-[5px]",onSelectionChange:xl},{default:l(()=>[m.value==="recentlyUpdated"?(u(),b(w,{key:0,type:"selection"})):x("",!0),e(w,{label:i(t)("appName"),align:"left",width:"450"},{default:l(({row:o})=>{var y,W;return[s("div",Bt,[e(yl,{class:"w-[54px] h-[54px]",src:o.icon,fit:"contain"},{error:l(()=>[St]),_:2},1032,["src"]),s("div",Rt,[s("div",Ft,d(o.title),1),o.install_info&&((y=Object.keys(o.install_info))!=null&&y.length)?(u(),f("div",Lt,d(o.install_info.version),1)):(u(),f("div",$t,d(o.version),1)),s("div",Dt,[m.value=="recentlyUpdated"&&o.install_info&&((W=Object.keys(o.install_info))!=null&&W.length)&&o.install_info.version!=o.version?(u(),b(Oe,{key:0,type:"danger",size:"small"},{default:l(()=>[_(d(i(t)("newVersion"))+d(o.version),1)]),_:2},1024)):x("",!0),hl(o)?(u(),b(oe,{key:1,effect:"dark",content:"该插件与框架版本不兼容,可能存在未知问题",placement:"top-start"},{default:l(()=>[e(Oe,{type:"info",size:"small",class:"ml-[3px]"},{default:l(()=>[_("该插件与框架版本不兼容,可能存在未知问题")]),_:1})]),_:1})):x("",!0)])])])]}),_:1},8,["label"]),e(w,{align:"left","min-width":"150"},{header:l(()=>[s("div",Mt,[s("span",jt,d(i(t)("appIdentification")),1),e(oe,{class:"box-item",effect:"light",content:i(t)("tipText"),placement:"bottom"},{default:l(()=>[e(c,{class:"cursor-pointer text-[16px] text-[#a9a9a9]"},{default:l(()=>[e(bl)]),_:1})]),_:1},8,["content"])])]),default:l(({row:o})=>[s("span",Nt,d(o.key),1)]),_:1}),e(w,{prop:"",label:i(t)("introduction"),align:"left","min-width":"200"},{default:l(({row:o})=>[s("span",Ot,d(o.desc),1)]),_:1},8,["label"]),e(w,{label:i(t)("type"),align:"left","min-width":"80"},{default:l(({row:o})=>[s("span",zt,d(o.type==="app"?i(t)("app"):i(t)("addon")),1)]),_:1},8,["label"]),e(w,{prop:"",label:i(t)("author"),align:"left","min-width":"80"},{default:l(({row:o})=>[s("span",Pt,d(o.author),1)]),_:1},8,["label"]),e(w,{label:i(t)("operation"),fixed:"right",align:"right",width:"250"},{default:l(({row:o})=>{var y,W;return[m.value=="recentlyUpdated"&&o.install_info&&((y=Object.keys(o.install_info))!=null&&y.length)&&o.install_info.version!=o.version?(u(),b(v,{key:0,class:"!text-[13px]",type:"primary",link:"",onClick:P=>Fe(o.key)},{default:l(()=>[_(d(i(t)("upgrade")),1)]),_:2},1032,["onClick"])):x("",!0),o.install_info&&((W=Object.keys(o.install_info))!=null&&W.length)?(u(),b(v,{key:1,class:"!text-[13px]",type:"primary",link:"",onClick:P=>ul(o.key)},{default:l(()=>[_(d(i(t)("unload")),1)]),_:2},1032,["onClick"])):x("",!0),o.is_download&&(!o.install_info||!Object.keys(o.install_info).length)?(u(),f(S,{key:2},[e(v,{class:"!text-[13px]",type:"primary",link:"",onClick:P=>Se(o.key)},{default:l(()=>[_(d(i(t)("install")),1)]),_:2},1032,["onClick"]),e(v,{class:"!text-[13px]",type:"primary",link:"",onClick:P=>ml(o.key)},{default:l(()=>[_(d(i(t)("delete")),1)]),_:2},1032,["onClick"])],64)):x("",!0),o.is_download?x("",!0):(u(),b(v,{key:3,class:"!text-[13px]",loading:R.value==o.key,disabled:R.value!="",type:"primary",link:"",onClick:Rl(P=>Ve(o),["stop"])},{default:l(()=>[s("span",null,d(i(t)("down")),1)]),_:2},1032,["loading","disabled","onClick"])),e(v,{class:"!text-[13px]",type:"primary",link:"",onClick:P=>pl(o)},{default:l(()=>[_(d(i(t)("detail")),1)]),_:2},1032,["onClick"]),e(v,{class:"!text-[13px]",type:"primary",link:"",onClick:P=>fl(o)},{default:l(()=>[_("更新信息")]),_:2},1032,["onClick"])]}),_:1},8,["label"])]),_:1},8,["data"])):x("",!0),k.value||!p.value[m.value].length?(u(),f("div",Kt,[e(ze,{data:[],size:"large",class:"pt-[5px]"},{empty:l(()=>[qt]),default:l(()=>[e(w,{label:i(t)("appName"),align:"left",width:"320"},null,8,["label"]),e(w,{align:"left","min-width":"120"}),e(w,{label:i(t)("introduction"),align:"left","min-width":"200"},null,8,["label"]),e(w,{label:i(t)("type"),align:"left","min-width":"100"},null,8,["label"]),e(w,{label:i(t)("author"),align:"left","min-width":"100"},null,8,["label"]),e(w,{label:i(t)("operation"),fixed:"right",align:"right",width:"150"},null,8,["label"])]),_:1}),k.value?Y((u(),f("div",Ht,null,512)),[[Qe,k.value]]):x("",!0)])):x("",!0),!p.value.installed.length&&!k.value&&m.value=="installed"&&!I.value?(u(),b(ie,{key:2,class:"mx-auto overview-empty"},{image:l(()=>[Qt]),description:l(()=>[s("p",Jt,d(i(t)("installed-empty")),1)]),_:1})):x("",!0),!p.value.uninstalled.length&&!k.value&&m.value=="uninstalled"&&!I.value?(u(),b(ie,{key:3,class:"mx-auto overview-empty"},{image:l(()=>[Gt]),description:l(()=>[s("p",Wt,[s("span",null,d(i(t)("descriptionLeft")),1),e(Pe,{type:"primary",onClick:Ne,class:"mx-[5px]"},{default:l(()=>[_(d(i(t)("link")),1)]),_:1}),s("span",null,d(i(t)("descriptionRight")),1)])]),_:1})):x("",!0),!p.value.all.length&&!k.value&&!ne.value&&m.value=="all"&&!I.value?(u(),f("div",Yt,[Zt,s("div",Xt,[e(v,{class:"w-[154px] !h-[48px] mt-[8px]",type:"primary",onClick:je},{default:l(()=>[_("授权码认证")]),_:1}),e(kl,{ref_key:"getAuthCodeDialog",ref:Me,placement:"bottom",width:478,trigger:"click",class:"mt-[8px]"},{reference:l(()=>[e(v,{class:"w-[154px] !h-[48px] mt-[8px] !text-[var(--el-color-primary)] hover:!text-[var(--el-color-primary)] !bg-transparent",plain:"",type:"primary"},{default:l(()=>[_("如何获取授权码?")]),_:1})]),default:l(()=>[s("div",ea,[la,s("div",ta,[e(v,{class:"w-[182px] !h-[48px]",plain:"",onClick:$e},{default:l(()=>[_("去应用市场逛逛")]),_:1}),e(v,{class:"w-[100px] !h-[48px]",plain:"",onClick:a[5]||(a[5]=o=>Me.value.hide())},{default:l(()=>[_("关闭")]),_:1})])])]),_:1},512)])])):x("",!0),!p.value.all.length&&!k.value&&ne.value&&m.value=="all"&&!I.value?(u(),b(ie,{key:5,class:"mx-auto overview-empty"},{image:l(()=>[aa]),description:l(()=>[s("p",sa,[s("span",null,d(i(t)("buyDescriptionLeft")),1),e(Pe,{type:"primary",onClick:Ne,class:"mx-[5px]"},{default:l(()=>[_(d(i(t)("link")),1)]),_:1}),s("span",null,d(i(t)("descriptionRight")),1)])]),_:1})):x("",!0),!p.value.recentlyUpdated.length&&!k.value&&ne.value&&m.value=="recentlyUpdated"&&!I.value?(u(),b(ie,{key:6,class:"mx-auto overview-empty"},{image:l(()=>[na]),description:l(()=>[s("p",oa,d(i(t)("recentlyUpdatedEmpty")),1)]),_:1})):x("",!0)]),e(G,{modelValue:se.value,"onUpdate:modelValue":a[9]||(a[9]=o=>se.value=o),title:"授权码认证",width:"400px"},{default:l(()=>[e(qe,{model:N,"label-width":"0",ref_key:"formRef",ref:ke,rules:_l,class:"page-form"},{default:l(()=>[e(Ke,{class:"box-card !border-none",shadow:"never"},{default:l(()=>[e(O,{prop:"auth_code"},{default:l(()=>[e(J,{modelValue:N.auth_code,"onUpdate:modelValue":a[6]||(a[6]=o=>N.auth_code=o),modelModifiers:{trim:!0},placeholder:i(t)("authCodePlaceholder"),class:"input-width",clearable:"",size:"large"},null,8,["modelValue","placeholder"])]),_:1}),s("div",ia,[e(O,{prop:"auth_secret"},{default:l(()=>[e(J,{modelValue:N.auth_secret,"onUpdate:modelValue":a[7]||(a[7]=o=>N.auth_secret=o),modelModifiers:{trim:!0},clearable:"",placeholder:i(t)("authSecretPlaceholder"),class:"input-width",size:"large"},null,8,["modelValue","placeholder"])]),_:1})]),s("div",da,d(i(t)("authInfoTips")),1),s("div",ua,[e(v,{type:"primary",class:"w-full",size:"large",loading:Q.value,onClick:a[8]||(a[8]=o=>vl(ke.value))},{default:l(()=>[_(d(i(t)("confirm")),1)]),_:1},8,["loading"])]),s("div",ra,[e(v,{type:"primary",link:"",onClick:$e},{default:l(()=>[_(d(i(t)("notHaveAuth")),1)]),_:1})])]),_:1})]),_:1},8,["model","rules"])]),_:1},8,["modelValue"]),e(G,{modelValue:ae.value,"onUpdate:modelValue":a[11]||(a[11]=o=>ae.value=o),title:i(t)("plugDetail"),width:"500px","destroy-on-close":!0},{footer:l(()=>[s("span",va,[e(v,{type:"primary",onClick:a[10]||(a[10]=o=>ae.value=!1)},{default:l(()=>[_(d(i(t)("confirm")),1)]),_:1})])]),default:l(()=>[e(qe,{model:j.value,"label-width":"120px",ref_key:"formRef",ref:ke,class:"page-form"},{default:l(()=>[e(O,{label:i(t)("title")},{default:l(()=>[s("div",ca,d(j.value.title),1)]),_:1},8,["label"]),e(O,{label:i(t)("desc")},{default:l(()=>[s("div",pa,d(j.value.desc),1)]),_:1},8,["label"]),e(O,{label:i(t)("author")},{default:l(()=>[s("div",fa,d(j.value.author),1)]),_:1},8,["label"]),e(O,{label:i(t)("version")},{default:l(()=>[s("div",_a,d(j.value.version),1)]),_:1},8,["label"])]),_:1},8,["model"])]),_:1},8,["modelValue","title"]),e(G,{modelValue:$.value,"onUpdate:modelValue":a[12]||(a[12]=o=>$.value=o),title:i(t)("addonInstall"),width:"850px","close-on-click-modal":!1,"close-on-press-escape":!1,"before-close":cl},{default:l(()=>[e(wl,{space:200,active:C.value,"finish-status":"success","align-center":""},{default:l(()=>[e(Ce,{title:i(t)("envCheck"),class:"flex-1"},null,8,["title"]),e(Ce,{title:i(t)("installProgress"),class:"flex-1"},null,8,["title"]),e(Ce,{title:i(t)("installComplete"),class:"flex-1"},null,8,["title"])]),_:1},8,["active"]),Y((u(),f("div",null,[e(He,{"max-height":"50vh"},{default:l(()=>[s("div",ma,[U.value.dir?(u(),f("div",ha,[s("p",xa,d(i(t)("dirPermission")),1),s("div",ga,[e(z,{class:"py-[10px] items table-head-bg pl-[15px] mb-[10px]"},{default:l(()=>[e(h,{span:12},{default:l(()=>[s("span",null,d(i(t)("path")),1)]),_:1}),e(h,{span:6},{default:l(()=>[s("span",null,d(i(t)("demand")),1)]),_:1}),e(h,{span:6},{default:l(()=>[s("span",null,d(i(t)("status")),1)]),_:1})]),_:1}),(u(!0),f(S,null,Z(U.value.dir.is_readable,(o,y)=>(u(),b(z,{class:"pb-[10px] items pl-[15px]",key:y},{default:l(()=>[e(h,{span:12},{default:l(()=>[s("span",null,d(o.dir),1)]),_:2},1024),e(h,{span:6},{default:l(()=>[s("span",null,d(i(t)("readable")),1)]),_:1}),e(h,{span:6},{default:l(()=>[o.status?(u(),f("span",ya,[e(c,{color:"green"},{default:l(()=>[e(de)]),_:1})])):(u(),f("span",ba,[e(c,{color:"red"},{default:l(()=>[e(ue)]),_:1})]))]),_:2},1024)]),_:2},1024))),128)),(u(!0),f(S,null,Z(U.value.dir.is_write,(o,y)=>(u(),b(z,{class:"pb-[10px] items pl-[15px]",key:y},{default:l(()=>[e(h,{span:12},{default:l(()=>[s("span",null,d(o.dir),1)]),_:2},1024),e(h,{span:6},{default:l(()=>[s("span",null,d(i(t)("write")),1)]),_:1}),e(h,{span:6},{default:l(()=>[o.status?(u(),f("span",ka,[e(c,{color:"green"},{default:l(()=>[e(de)]),_:1})])):(u(),f("span",wa,[e(c,{color:"red"},{default:l(()=>[e(ue)]),_:1})]))]),_:2},1024)]),_:2},1024))),128))])])):x("",!0)])]),_:1}),s("div",Ca,[e(oe,{effect:"dark",content:i(t)("installTips"),placement:"top"},{default:l(()=>[e(v,{disabled:!U.value.is_pass||M.value,loading:D.value,onClick:ol},{default:l(()=>[_(d(i(t)("localInstall")),1)]),_:1},8,["disabled","loading"])]),_:1},8,["content"]),e(oe,{effect:"dark",content:i(t)("cloudInstallTips"),placement:"top"},{default:l(()=>[e(v,{type:"primary",disabled:!U.value.is_pass||D.value,loading:M.value,onClick:il},{default:l(()=>[_(d(i(t)("cloudInstall")),1)]),_:1},8,["disabled","loading"])]),_:1},8,["content"])])])),[[pe,C.value==1],[Qe,!U.value.dir]]),Y(s("div",Ua,[e(i(mt),{ref_key:"terminalRef",ref:F,context:E.value,"init-log":null,"show-header":!1,"show-log-time":!0,onExecCmd:al},null,8,["context"])],512),[[pe,C.value==2]]),Y(s("div",Ia,[e(Cl,{icon:"success",title:i(t)("addonInstallSuccess")},null,8,["title"]),(u(!0),f(S,null,Z(ve.value,(o,y)=>(u(),f("div",{class:"mb-[10px]",key:y},[e(Ul,{title:o,type:"error",closable:!1},null,8,["title"])]))),128))],512),[[pe,C.value==3]])]),_:1},8,["modelValue","title"]),e(G,{modelValue:be.value,"onUpdate:modelValue":a[13]||(a[13]=o=>be.value=o),title:i(t)("addonUninstall"),width:"850px","close-on-click-modal":!1,"close-on-press-escape":!1},{default:l(()=>[e(He,{"max-height":"50vh"},{default:l(()=>[s("div",Ta,[te.value.dir?(u(),f("div",Aa,[s("p",Va,d(i(t)("dirPermission")),1),s("div",Ea,[e(z,{class:"py-[10px] items table-head-bg pl-[15px] mb-[10px]"},{default:l(()=>[e(h,{span:12},{default:l(()=>[s("span",null,d(i(t)("path")),1)]),_:1}),e(h,{span:6},{default:l(()=>[s("span",null,d(i(t)("demand")),1)]),_:1}),e(h,{span:6},{default:l(()=>[s("span",null,d(i(t)("status")),1)]),_:1})]),_:1}),(u(!0),f(S,null,Z(te.value.dir.is_readable,(o,y)=>(u(),b(z,{class:"pb-[10px] items pl-[15px]",key:y},{default:l(()=>[e(h,{span:12},{default:l(()=>[s("span",null,d(o.dir),1)]),_:2},1024),e(h,{span:6},{default:l(()=>[s("span",null,d(i(t)("readable")),1)]),_:1}),e(h,{span:6},{default:l(()=>[o.status?(u(),f("span",Ba,[e(c,{color:"green"},{default:l(()=>[e(de)]),_:1})])):(u(),f("span",Sa,[e(c,{color:"red"},{default:l(()=>[e(ue)]),_:1})]))]),_:2},1024)]),_:2},1024))),128)),(u(!0),f(S,null,Z(te.value.dir.is_write,(o,y)=>(u(),b(z,{class:"pb-[10px] items pl-[15px]",key:y},{default:l(()=>[e(h,{span:12},{default:l(()=>[s("span",null,d(o.dir),1)]),_:2},1024),e(h,{span:6},{default:l(()=>[s("span",null,d(i(t)("write")),1)]),_:1}),e(h,{span:6},{default:l(()=>[o.status?(u(),f("span",Ra,[e(c,{color:"green"},{default:l(()=>[e(de)]),_:1})])):(u(),f("span",Fa,[e(c,{color:"red"},{default:l(()=>[e(ue)]),_:1})]))]),_:2},1024)]),_:2},1024))),128))])])):x("",!0)])]),_:1})]),_:1},8,["modelValue","title"]),e(G,{modelValue:q.value,"onUpdate:modelValue":a[15]||(a[15]=o=>q.value=o),title:"下载提示",width:"30%"},{footer:l(()=>[s("span",$a,[e(v,{onClick:a[14]||(a[14]=o=>q.value=!1)},{default:l(()=>[_("取消")]),_:1}),e(v,{type:"primary",onClick:tl},{default:l(()=>[_("确定")]),_:1})])]),default:l(()=>[La]),_:1},8,["modelValue"])]}),_:1})]),e(wt,{upgradeKey:De.value,ref_key:"upgradeLogRef",ref:Te},null,8,["upgradeKey"]),e(bt,{ref_key:"upgradeRef",ref:_e,onComplete:B,onCloudbuild:Le},null,512),e(kt,{ref_key:"cloudBuildRef",ref:K},null,512)],64)}}});const bs=Ct(Da,[["__scopeId","data-v-561a782c"]]);export{bs as default};
|