LoginContainer-BzWlEOSi.js 2.7 KB

1
  1. import{cS as b,gY as j,fY as t,fw as s,cu as _,cr as r,cy as o,h2 as e,fi as z,cs as p,cx as C,gA as v,F as O,fV as W,fh as I,gQ as u,ct as w,eO as k,fW as L,gT as Y,dm as A,eW as D,cb as h,dK as E,ae as $}from"./admin-ChNvQhEc.js";const M={class:"login-warp flex-center"},P={class:"login-container w-full h-full"},Q=b({__name:"LoginLayout",props:{lang:{type:Boolean,default:!0}},setup(i){const{user:n,theme:a}=j(),g=l=>{Y(D,A()).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=E(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"),U=t("el-dropdown-menu"),N=t("arrow-down"),V=t("el-button"),F=t("el-dropdown"),R=t("el-row");return s(),_("div",M,[r("div",P,[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:z({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(U,{class:"w-180"},{default:e(()=>[(s(!0),_(O,null,W(u(k),(c,K)=>(s(),p(T,{key:K,value:c.value,onClick:Z=>g(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(()=>[C(v(d.value),1),o(y,{class:"el-icon--right"},{default:e(()=>[o(N)]),_:1})]),_:1})]),_:1})):w("",!0),L(l.$slots,"default",{},void 0,!0)]),_:3})]),_:3})])])}}}),te=$(Q,[["__scopeId","data-v-ace8c672"]]),q={class:"login-form-container p-24"},G={class:"login-title"},H={class:"logo text-center"},J={key:0,class:"sub-title text-center"},X=b({__name:"LoginContainer",props:{title:String,subTitle:String},setup(i){return(n,a)=>{const g=t("LogoFull"),d=t("el-text"),m=t("el-card");return s(),_("div",q,[r("div",G,[r("div",H,[L(n.$slots,"logo",{},()=>[o(g,{height:"45px"})],!0)]),i.subTitle?(s(),_("div",J,[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=$(X,[["__scopeId","data-v-f2584f5f"]]);export{oe as L,te as a};