2 lines
18 KiB
JavaScript
2 lines
18 KiB
JavaScript
|
|
import{bh as me,bg as _e,aW as H,bj as ue,aX as L,aZ as I,bb as pe,aT as z,b1 as u,bq as ye,a$ as C,b9 as d,b0 as o,br as ge,b4 as e,bc as P,bk as E,b6 as i,b5 as _,bl as s,dE as le,bW as X,bY as D,b_ as q,b2 as t,cf as Z,aY as J,ci as ae,b7 as oe,c3 as be,c6 as ve,bm as ie,bN as xe,bp as he,bd as ee,cy as re,bX as j,bZ as te,be as ke,cV as we,ce,bw as S,dF as $e,dG as Ae,dH as Ce,cr as Ie}from"./chat-BQoI2g3l.js";import{_ as Se,C as Ee}from"./index-BiMR1en-.js";import{_ as Re,s as Y}from"./SettingAPIKeyDialog.vue_vue_type_script_setup_true_lang-CK2HMnSF.js";const fe="/license",De=O=>_e(`${fe}/profile`,void 0,O),ze=(O,l)=>me(`${fe}/profile`,O,void 0,l),de={getLicense:De,putLicense:ze},Pe=["id"],Ke={class:"about-ui"},Ne={class:"flex"},Me={class:"label"},We={class:"flex"},Oe={class:"label"},Te={key:0,class:"color-danger"},Ve={class:"flex"},Ue={class:"label"},Le={class:"flex"},Be={class:"label"},Ge={class:"flex"},Fe={class:"label"},Xe={class:"flex"},He={class:"label"},je={key:0,class:"mt-16 flex align-center"},Ye={class:"border-t text-center mt-16 p-16 pb-0"},qe=H({__name:"AboutDialog",setup(O,{expose:l}){const{user:g,theme:c}=ue(),b=L(()=>c.isDefaultTheme()),y=I(!1),v=I(!1),x=I(null),R=I(!1);pe(y,n=>{n||(R.value&&window.location.reload(),R.value=!1)});const f=()=>{g.showXpack()&&F(),y.value=!0},a=n=>{const p=new FormData;p.append("license_file",n.raw),de.putLicense(p,v).then(w=>{F(),R.value=!0})},h=L(()=>g?g.getEditionName()==="PE"?z("layout.about.edition.professional"):g.getEditionName()==="EE"?z("layout.about.edition.enterprise"):z("layout.about.edition.community"):"-");function F(){de.getLicense(v).then(n=>{var p;x.value=(p=n.data)==null?void 0:p.license})}return l({open:f}),(n,p)=>{const w=u("LogoFull"),V=u("el-button"),r=u("el-upload"),$=u("el-text"),A=u("el-dialog"),N=ye("loading");return d(),C(A,{modelValue:y.value,"onUpdate:modelValue":p[0]||(p[0]=k=>y.value=k),class:Z(["about-dialog border-r-6",b.value?"":"dialog-custom-header"])},{header:o(({titleId:k,titleClass:T})=>[e("div",{class:Z(["logo flex-center",T]),id:k},[t(w,{height:"59px"})],10,Pe)]),default:o(()=>{var k,T,M,B,K,W,G;return[ge((d(),P("div",Ke,[e("div",Ne,[e("span",Me,i(n.$t("layout.about.authorize")),1),e("span",null,i(((k=x.value)==null?void 0:k.corporation)||"-"),1)]),e("div",We,[e("span",Oe,i(n.$t("layout.about.expiredTime")),1),e("span",null,[_(i(((T=x.value)==null?void 0:T.expired)||"-")+" ",1),(M=x.value)!=null&&M.expired&&s(le)((B=x.value)==null?void 0:B.expired)?(d(),P("span",Te,"("+i(s(le)((K=x.value)==null?void 0:K.expired))+")",1)):E("",!0)])]),e("div",Ve,[e("span",Ue,i(n.$t("layout.about.edition.label")),1),e("span",null,i(h.value),1)]),e("div",Le,[e("span",Be,i(n.$t("layout.about.version")),1),e("span",null,i(s(g).version),1)]),e("div",Ge,[e("span",Fe,i(n.$t("layout.about.serialNo")),1),e("span",null,i(((W=x.value)==null?void 0:W.serialNo)||"-"),1)]),e("div",Xe,[e("span",He,i(n.$t("layout.about.remark")),1),e("span",null,i(((G=x.value)==null?void 0:G.remark)||"-"),1)]),s(g).showXpack()?(d(),P("div",je,[s(X)([s(D).ADMIN,s(q).ABOUT_UPDATE],"OR")?(d(),C(r,{key:0,ref:"uploadRef",action:"#","auto-upload":!1,"show-file-list":!1,"on-change":a},{default:o(()=>[t(V,{class:"border-primary mr-16"},{default:o(()=>[_(i(n.$t("layout.about.update"))+" License ",1)]),_:1})]),_:1},512)):E("",!0)])):E("",!0)])),[[N,v.value]]),e("div",Ye,[t($,{type:"info"},{default:o(()=>[_(i(n.$t("layout.copyright")),1)]),_:1})])]}),_:1},8,["modelValue","class"])}}}),Ze={style:{"margin-top":"10px"}},Je={class:"vertical-middle lighter break-all"},Qe={class:"mr-4"},et=H({__name:"APIKeyDialog",props:{userId:{type:String,default:""}},emits:["addData"],setup(O,{expose:l,emit:g}){const c=J(),{params:{id:b}}=c,y=window.location.origin+`${window.MaxKB.prefix}/api-doc/`,v=I(),x=I(!1),R=I(!1),f=I(null);pe(x,r=>{r||(f.value=null)});function a(r){v.value.open(r,"USER")}function h(r){ve(`${z("views.applicationOverview.appInfo.APIKeyDialog.msgConfirm1")}: ${r.secret_key}?`,z(z("views.applicationOverview.appInfo.APIKeyDialog.msgConfirm2")),{confirmButtonText:z("common.confirm"),cance
|