LoginContainer-BSRLp4GS.js 2.7 KB

1
  1. import{cQ as C,gV as z,fV as t,ft as s,cs as g,cp as r,cw as o,g$ as e,ff as K,cq as p,cv as $,gx as v,F as Q,fS as q,fe as I,gN as u,cr as w,eL as k,fT as L,gQ as D,dk as E,eT as M,c9 as h,dI as O,ac as b}from"./builder-DygomDiV.js";const P={class:"login-warp flex-center"},A={class:"login-container w-full h-full"},G=C({__name:"LoginLayout",props:{lang:{type:Boolean,default:!0}},setup(i){const{user:n,theme:a}=z(),_=l=>{D(M,E()).value=l,window.location.reload()},d=h(()=>k.value?.filter(l=>l.value===n.getLanguage())?.[0]?.label),m=h(()=>a.themeInfo?.loginImage?typeof a.themeInfo?.loginImage=="string"?a.themeInfo?.loginImage:URL.createObjectURL(a.themeInfo?.loginImage):""),S=h(()=>{if(a.themeInfo?.loginImage)return`${m.value}`;{const l=O(a.themeInfo?.theme),x=`${window.MaxKB.prefix}/theme/${l}.jpg`;return new URL(x,import.meta.url).href}});return(l,x)=>{const f=t("el-col"),B=t("Check"),y=t("el-icon"),T=t("el-dropdown-item"),N=t("el-dropdown-menu"),U=t("arrow-down"),V=t("el-button"),F=t("el-dropdown"),R=t("el-row");return s(),g("div",P,[r("div",A,[o(R,{class:"container w-full h-full"},{default:e(()=>[o(f,{xs:0,sm:0,md:10,lg:10,xl:10,class:"left-container"},{default:e(()=>[r("div",{class:"login-image",style:K({backgroundImage:`url(${S.value})`})},null,4)]),_:1}),o(f,{xs:24,sm:24,md:14,lg:14,xl:14,class:"right-container flex-center"},{default:e(()=>[i.lang?(s(),p(F,{key:0,trigger:"click",type:"primary",class:"lang"},{dropdown:e(()=>[o(N,{class:"w-180"},{default:e(()=>[(s(!0),g(Q,null,q(u(k),(c,j)=>(s(),p(T,{key:j,value:c.value,onClick:Z=>_(c.value),class:"flex-between"},{default:e(()=>[r("span",{class:I(c.value===u(n).getLanguage()?"primary":"")},v(c.label),3),c.value===u(n).getLanguage()?(s(),p(y,{key:0,class:I(c.value===u(n).getLanguage()?"primary":"")},{default:e(()=>[o(B)]),_:1},8,["class"])):w("",!0)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),default:e(()=>[o(V,null,{default:e(()=>[$(v(d.value),1),o(y,{class:"el-icon--right"},{default:e(()=>[o(U)]),_:1})]),_:1})]),_:1})):w("",!0),L(l.$slots,"default",{},void 0,!0)]),_:3})]),_:3})])])}}}),te=b(G,[["__scopeId","data-v-ace8c672"]]),H={class:"login-form-container p-24"},J={class:"login-title"},W={class:"logo text-center"},X={key:0,class:"sub-title text-center"},Y=C({__name:"LoginContainer",props:{title:String,subTitle:String},setup(i){return(n,a)=>{const _=t("LogoFull"),d=t("el-text"),m=t("el-card");return s(),g("div",H,[r("div",J,[r("div",W,[L(n.$slots,"logo",{},()=>[o(_,{height:"45px"})],!0)]),i.subTitle?(s(),g("div",X,[o(d,{type:"info"},{default:e(()=>[$(v(i.subTitle),1)]),_:1})])):w("",!0)]),o(m,{class:"login-card"},{default:e(()=>[L(n.$slots,"default",{},void 0,!0)]),_:3})])}}}),oe=b(Y,[["__scopeId","data-v-f2584f5f"]]);export{oe as L,te as a};