2 lines
6.4 KiB
JavaScript
2 lines
6.4 KiB
JavaScript
import{x as L,R as S,_ as C}from"./index-BQ5jItLS.js";import{s,m as d,d as w,e as N}from"./index-C8UxKu_K.js";import{B as V}from"./index-CmxJgQ5v.js";import{F as R}from"./index-DMUx96ts.js";import{u as H,t as M}from"./terminal-q4retXry.js";import{B as U,a as P,I as h,X as b,C as n,D as a,G as l,u as e,U as o,_ as D,W as m,V as r,H as u,P as p,O as W,ag as j}from"./vue-Ce7h5hs3.js";import"./index-C9pWMHjm.js";import"./index-CTT0ef74.js";const F={class:"install-done"},O={class:"install-done-title"},z={key:0},G={key:1},X={key:2},$={key:3},q={class:"install-tis-box"},J={key:0,class:"depend-box"},K={key:0,class:"depend-loading"},Q={class:"depend-tis"},Y={key:0},Z={class:"color-red"},ee={key:0},te={key:1},oe={key:1,class:"color-green"},le={key:2,class:"exec-fail color-red"},se={key:1,class:"depend-tis"},ne={key:2},ae={key:0,class:"install-tis-box text-align-center"},de={class:"install-tis"},ie={class:"dependency-installation-fail-tips"},me={class:"install-tis-box"},ce={class:"install-tis"},re={class:"install-tis-box"},ue={class:"install-form"},pe={key:1,class:"install-tis-box"},_e={class:"install-form"},he={class:"el-popover__title"},fe={class:"reload-hot-server-content"},ve={class:"block-help hot-server-tips"},ye={class:"install-done-button-box"},Se=U({__name:"commonDone",setup(be){const{t}=L.useI18n(),_=H(),i=P({rebuild:0,reloadHotServer:0}),v=()=>{_.toggle(!0)},I=()=>{s.dialog.common=!1,i.rebuild==1?(_.toggle(!0),_.addTaskPM("web-build",!1,"",y=>{y==M.Success&&(_.toggle(!1),i.reloadHotServer==1&&s.common.moduleState!=d.DISABLE)})):i.reloadHotServer==1&&s.common.moduleState!=d.DISABLE},g=()=>{j.confirm(t("module.Is the command that failed on the WEB terminal executed manually or in other ways successfully?"),t("Reminder"),{confirmButtonText:t("module.yes"),cancelButtonText:t("Cancel"),type:"warning"}).then(()=>{s.loading.common=!0,w(s.common.uid).then(()=>{N(),s.loading.common=!1,s.common.dependInstallState="success"})})};return(y,c)=>{const k=h("el-link"),x=h("el-popover"),E=h("el-form-item"),T=h("el-button"),A=b("loading"),B=b("blur");return n(),a("div",F,[l("div",O,[e(s).common.moduleState==e(d).INSTALLED?(n(),a("span",z,o(e(t)("module.Congratulations, module installation is complete")),1)):e(s).common.moduleState==e(d).DISABLE?(n(),a("span",G,o(e(t)("module.Module is disabled")),1)):e(s).common.moduleState==e(d).DEPENDENT_WAIT_INSTALL?(n(),a("span",X,o(e(t)("module.Congratulations, the code of the module is ready")),1)):(n(),a("span",$,o(e(t)("module.Unknown state")),1))]),l("div",q,[e(s).common.dependInstallState!="none"?(n(),a("div",J,[e(s).common.dependInstallState=="executing"?D((n(),a("div",K,null,512)),[[A,!0]]):m("",!0),l("div",Q,[e(s).common.dependInstallState=="executing"?(n(),a("div",Y,[l("span",Z,o(e(t)("module.Do not refresh the page!")),1),e(s).common.moduleState==e(d).DISABLE?(n(),a("span",ee,o(e(t)("module.New adjustment of dependency detected")),1)):e(s).common.moduleState==e(d).DEPENDENT_WAIT_INSTALL?(n(),a("span",te,o(e(t)("module.This module adds new dependencies")),1)):m("",!0),c[2]||(c[2]=l("span",null,",",-1)),l("span",null,o(e(t)("module.The built-in terminal of the system is automatically installing these dependencies, please wait~")),1),l("span",{class:"span-a",onClick:v},o(e(t)("module.View progress")),1)])):m("",!0),e(s).common.dependInstallState=="success"?(n(),a("div",oe,o(e(t)("module.Dependency installation completed~")),1)):m("",!0),e(s).common.dependInstallState=="fail"?(n(),a("div",le,[r(o(e(t)("module.Dependency installation fail 1"))+" ",1),l("span",{class:"span-a",onClick:v},o(e(t)("module.Dependency installation fail 2")),1),r(" "+o(e(t)("module.Dependency installation fail 3"))+" ",1),u(k,{target:"_blank",type:"primary",href:"https://doc.buildadmin.com/guide/install/manualOperation.html"},{default:p(()=>[r(o(e(t)("module.Dependency installation fail 4")),1)]),_:1})])):m("",!0)])])):e(s).common.moduleState==e(d).INSTALLED?(n(),a("div",se,o(e(t)("module.This module does not add new dependencies")),1)):(n(),a("div",ne,o(e(t)("module.There is no adjustment for system dependency")),1))]),e(s).common.dependInstallState=="fail"?(n(),a("div",ae,[l("div",de,[r(o(e(t)("module.Dependency installation fail 5"))+" ",1),l("span",{class:"span-a",onClick:g},o(e(t)("module.Dependency installation fail 6")),1),r(" "+o(e(t)("module.Dependency installation fail 7"))+" ",1),l("span",ie,o(e(t)("module.dependency-installation-fail-tips")),1)])])):m("",!0),l("div",me,[l("div",ce,o(e(t)("module.please"))+" "+o(e(s).common.moduleState==e(d).DISABLE?"":e(t)("module.After installation 1"))+" "+o(e(t)("module.Manually clean up the system and browser cache")),1)]),l("div",re,[l("div",ue,[u(R,{label:(e(s).common.moduleState==e(d).DISABLE?"":e(t)("module.After installation 2"))+e(t)("module.Automatically execute reissue command?"),modelValue:i.rebuild,"onUpdate:modelValue":c[0]||(c[0]=f=>i.rebuild=f),type:"radio","input-attr":{border:!0,content:{0:e(t)("module.no"),1:e(t)("module.yes")}}},null,8,["label","modelValue","input-attr"])])]),e(S).dirtyFile&&e(s).common.moduleState!=e(d).DISABLE?(n(),a("div",pe,[l("div",_e,[u(E,{label:e(t)("module.After installation 2")+e(t)("module.Restart Vite hot server")},{default:p(()=>[u(V,{modelValue:i.reloadHotServer,"onUpdate:modelValue":c[1]||(c[1]=f=>i.reloadHotServer=f),type:"radio",attr:{class:"hot-server-input",border:!0,content:{0:e(t)("vite.Later")+e(t)("module.Manual restart"),1:e(t)("module.Restart Now")}}},null,8,["modelValue","attr"]),u(x,{width:360,placement:"top"},{reference:p(()=>[l("div",ve,o(e(t)("module.detailed information"))+"?",1)]),default:p(()=>[l("div",null,[l("div",he,o(e(t)("vite.Reload hot server title")),1),l("div",fe,[l("p",null,[l("span",null,o(e(t)("vite.Reload hot server tips 1")),1),l("span",null,"【"+o(e(t)(`vite.Close type ${e(S).closeType}`))+"】",1),l("span",null,o(e(t)("vite.Reload hot server tips 2")),1)]),l("p",null,o(e(t)("vite.Reload hot server tips 3")),1),l("p",null,o(e(t)("module.Restart Vite hot server tips")),1)])])]),_:1})]),_:1},8,["label"])])])):m("",!0),l("div",ye,[D((n(),W(T,{disabled:!(e(s).common.dependInstallState!="executing"||e(s).common.moduleState==e(d).INSTALLED),size:"large",class:"install-done-button",type:"primary",loading:e(s).loading.common,onClick:I},{default:p(()=>[r(o(e(s).common.moduleState==e(d).DISABLE?e(t)("Complete"):e(t)("module.End of installation")),1)]),_:1},8,["disabled","loading"])),[[B]])])])}}}),Be=C(Se,[["__scopeId","data-v-fabd7ed2"]]);export{Be as default};
|