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