LoginContainer-_SHbwV5a.js 2.7 KB

1
  1. import{cV as k,h4 as z,g2 as t,fC as s,cx as g,cu as r,cB as o,hb as e,fo as K,cv as p,cA as C,gH as v,F as O,f$ as A,fn as I,gY as u,cw as w,eS as $,g0 as L,g$ as D,dr as E,e$ as H,ce as h,dO as M,af as b}from"./admin-KIlVrsVZ.js";const P={class:"login-warp flex-center"},Y={class:"login-container w-full h-full"},q=k({__name:"LoginLayout",props:{lang:{type:Boolean,default:!0}},setup(i){const{user:n,theme:a}=z(),_=l=>{D(H,E()).value=l,window.location.reload()},d=h(()=>$.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):""),B=h(()=>{if(a.themeInfo?.loginImage)return`${m.value}`;{const l=M(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"),S=t("Check"),y=t("el-icon"),U=t("el-dropdown-item"),N=t("el-dropdown-menu"),T=t("arrow-down"),V=t("el-button"),F=t("el-dropdown"),R=t("el-row");return s(),g("div",P,[r("div",Y,[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(${B.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(O,null,A(u($),(c,j)=>(s(),p(U,{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(S)]),_:1},8,["class"])):w("",!0)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),default:e(()=>[o(V,null,{default:e(()=>[C(v(d.value),1),o(y,{class:"el-icon--right"},{default:e(()=>[o(T)]),_:1})]),_:1})]),_:1})):w("",!0),L(l.$slots,"default",{},void 0,!0)]),_:3})]),_:3})])])}}}),te=b(q,[["__scopeId","data-v-ace8c672"]]),G={class:"login-form-container p-24"},J={class:"login-title"},Q={class:"logo text-center"},W={key:0,class:"sub-title text-center"},X=k({__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",G,[r("div",J,[r("div",Q,[L(n.$slots,"logo",{},()=>[o(_,{height:"45px"})],!0)]),i.subTitle?(s(),g("div",W,[o(d,{type:"info"},{default:e(()=>[C(v(i.subTitle),1)]),_:1})])):w("",!0)]),o(m,{class:"login-card"},{default:e(()=>[L(n.$slots,"default",{},void 0,!0)]),_:3})])}}}),oe=b(X,[["__scopeId","data-v-f2584f5f"]]);export{oe as L,te as a};