2 lines
2.9 KiB
JavaScript
2 lines
2.9 KiB
JavaScript
import{ay as C,aA as K,aO as w,cT as b,cU as j,aD as o,aW as m,aF as i,aI as _,aH as n,aG as t,bd as z,aE as L,b1 as y,cE as x,aK as $,aJ as I,aX as D,aY as O,ce as k,b2 as g,cV as W,cn as A,cW as G,cf as B}from"./admin-BkqzSx7d.js";const H={class:"login-warp flex-center"},J={class:"login-container w-full h-full"},M=C({__name:"LoginLayout",props:{lang:{type:Boolean,default:!0}},setup(d){const{user:c,theme:r}=K(),f=e=>{W(G,A()).value=e,window.location.reload()},p=w(()=>{var e,l,a;return(a=(l=(e=b.value)==null?void 0:e.filter(s=>s.value===c.getLanguage()))==null?void 0:l[0])==null?void 0:a.label}),h=w(()=>{var e,l,a,s;return(e=r.themeInfo)!=null&&e.loginImage?typeof((l=r.themeInfo)==null?void 0:l.loginImage)=="string"?(a=r.themeInfo)==null?void 0:a.loginImage:URL.createObjectURL((s=r.themeInfo)==null?void 0:s.loginImage):""}),S=w(()=>{var e,l;if((e=r.themeInfo)!=null&&e.loginImage)return`${h.value}`;{const a=j((l=r.themeInfo)==null?void 0:l.theme),s=`${window.MaxKB.prefix}/theme/${a}.jpg`;return new URL(s,import.meta.url).href}});return(e,l)=>{const a=o("el-col"),s=o("Check"),v=o("el-icon"),U=o("el-dropdown-item"),T=o("el-dropdown-menu"),N=o("arrow-down"),V=o("el-button"),F=o("el-dropdown"),R=o("el-row");return i(),m("div",H,[_("div",J,[n(R,{class:"container w-full h-full"},{default:t(()=>[n(a,{xs:0,sm:0,md:10,lg:10,xl:10,class:"left-container"},{default:t(()=>[_("div",{class:"login-image",style:z({backgroundImage:`url(${S.value})`})},null,4)]),_:1}),n(a,{xs:24,sm:24,md:14,lg:14,xl:14,class:"right-container flex-center"},{default:t(()=>[d.lang?(i(),L(F,{key:0,trigger:"click",type:"primary",class:"lang"},{dropdown:t(()=>[n(T,{style:{width:"180px"}},{default:t(()=>[(i(!0),m(D,null,O(g(b),(u,E)=>(i(),L(U,{key:E,value:u.value,onClick:Z=>f(u.value),class:"flex-between"},{default:t(()=>[_("span",{class:k(u.value===g(c).getLanguage()?"primary":"")},I(u.label),3),u.value===g(c).getLanguage()?(i(),L(v,{key:0,class:k(u.value===g(c).getLanguage()?"primary":"")},{default:t(()=>[n(s)]),_:1},8,["class"])):y("",!0)]),_:2},1032,["value","onClick"]))),128))]),_:1})]),default:t(()=>[n(V,null,{default:t(()=>[$(I(p.value),1),n(v,{class:"el-icon--right"},{default:t(()=>[n(N)]),_:1})]),_:1})]),_:1})):y("",!0),x(e.$slots,"default",{},void 0,!0)]),_:3})]),_:3})])])}}}),te=B(M,[["__scopeId","data-v-e707a837"]]),P={class:"login-form-container p-24"},X={class:"login-title"},Y={class:"logo text-center"},q={key:0,class:"sub-title text-center"},Q=C({__name:"LoginContainer",props:{title:String,subTitle:String},setup(d){return(c,r)=>{const f=o("LogoFull"),p=o("el-text"),h=o("el-card");return i(),m("div",P,[_("div",X,[_("div",Y,[x(c.$slots,"logo",{},()=>[n(f,{height:"45px"})],!0)]),d.subTitle?(i(),m("div",q,[n(p,{type:"info"},{default:t(()=>[$(I(d.subTitle),1)]),_:1})])):y("",!0)]),n(h,{class:"login-card"},{default:t(()=>[x(c.$slots,"default",{},void 0,!0)]),_:3})])}}}),oe=B(Q,[["__scopeId","data-v-f2584f5f"]]);export{oe as L,te as a};
|