Files
2026-08-27 12:18:36 +08:00

31 lines
6.8 KiB
JavaScript

;(() => {
const stylesheetSelector = "link[rel=stylesheet]"
const loaded = new Set(Array.from(document.querySelectorAll(stylesheetSelector)).map(link => link.href))
const version = "1787646744133"
const findLoadedLink = href => Array.from(document.querySelectorAll(stylesheetSelector)).find(link => link.href === href)
const removeAfterLoad = (freshLink, staleLink) => {
const remove = () => staleLink.remove()
if (freshLink.sheet) {
requestAnimationFrame(remove)
return
}
freshLink.addEventListener("load", remove, { once: true })
}
for (const link of Array.from(document.querySelectorAll(stylesheetSelector))) {
const url = new URL(link.href, location.href)
if (url.origin !== location.origin || url.searchParams.get("v") === version) continue
url.searchParams.set("v", version)
if (loaded.has(url.href)) {
const freshLink = findLoadedLink(url.href)
if (freshLink && freshLink !== link) removeAfterLoad(freshLink, link)
continue
}
const freshLink = document.createElement("link")
freshLink.rel = "stylesheet"
freshLink.href = url.href
link.parentNode?.insertBefore(freshLink, link.nextSibling)
loaded.add(url.href)
removeAfterLoad(freshLink, link)
}
})();
import{r as e}from"./rolldown-runtime.js?v=1787646744133";import{Cn as t,Dn as n,En as r,Ft as i,Jn as a,Or as o,Sn as ee,bn as s,br as c,cr as l,dn as u,ei as d,fn as te,kn as f,nn as p,vr as m,wr as h,xn as ne}from"./vendor-utils.js?v=1787646744133";import{l as g}from"./vendor-vue.js?v=1787646744133";import{B as re,F as ie,L as ae,St as _,d as v,gt as oe,mt as se,p as ce}from"./vendor-naive.js?v=1787646744133";import{Lf as y,Tc as b,Yd as x,bf as S,gf as C,ln as le,mn as ue,r as w,sp as T,yp as E,zf as D}from"./app.js?v=1787646744133";import{Ji as O}from"./app-components.js?v=1787646744133";p();var k={class:`font-600`},A={class:`info flex mt-50px w-820px mx-auto`},j={class:`tips py-40px w-50%`},M={class:`font-600 text-16px`},N={class:`mt-10px mb-20px font-600 text-16px`},P={key:0,class:`w-50% py-24px px-32px`},F={class:`my-16px`},I={class:`my-16px`},L={class:`w-100%`},R={class:`flex justify-end mt-8px`},de={key:1,class:`w-50% p-30px`},z={class:`font-600 text-left`},B={class:`underline`},V={class:`text-16px my-20px text-left`},H={key:0,class:`ml-5px`},U=f({__name:`index`,setup(e){let{t:f}=g(),p=c(null),D=c(null),U=m({email:``,password:``,isPro:1}),W={email:{required:!0,trigger:[`blur`,`input`],message:f(`Component.BindAccount.index_4`)},password:{required:!0,trigger:[`blur`,`input`],message:f(`Component.BindAccount.index_5`)}},G=m({username:``,password:``,isPro:1}),K={username:{required:!0,trigger:[`blur`,`input`],message:f(`Component.BindAccount.index_4`)},password:{required:!0,trigger:[`blur`,`input`],message:f(`Component.BindAccount.index_5`)}},q=c(!1),J=c(!1),fe=e=>{J.value=e===`login`},Y=c(60),X=c(!0),Z,pe=()=>{X.value=!1,Z&&clearInterval(Z),Z=setInterval(()=>{Y.value--,Y.value<=0&&(clearInterval(Z),Y.value=60,X.value=!0)},1e3)},me=async()=>{var e;await((e=p.value)==null?void 0:e.validate());let{message:t}=await C(h(U));E(t)&&(t.status?(q.value=!0,y.success(t.msg)):y.error(t.msg))},he=()=>J.value?G:{username:U.email,password:U.password,isPro:1},Q=async()=>{var e;await((e=D.value)==null?void 0:e.validate());try{await x(h(he()))}catch(e){i(e,`message.validated`,!0)||(q.value=!0);return}await b({force:1}),w.push(`/`)},ge=()=>{pe(),S({email:J.value?G.username:U.email})},$=()=>{window.location.href=`${T()}/google/redirect`};return(e,i)=>{let c=le,f=oe,m=re,h=_,g=ie,y=O,b=ce,x=ue,S=v,C=ae,w=se;return a(),ne(w,{class:`box pt-100px flex items-center text-center`},{default:l(()=>[s(`h1`,k,d(e.$t(`Login.index_26`)),1),s(`div`,A,[s(`div`,j,[i[7]||(i[7]=s(`h3`,{class:`font-600 mb-20px`},`aaPanel Pro`,-1)),s(`div`,M,d(e.$t(`Login.index_29`)),1),s(`div`,N,d(e.$t(`Login.index_30`)),1),n(c,{class:`text-left pl-30px w-400px`},{default:l(()=>[s(`li`,null,d(e.$t(`Login.index_27`)),1),s(`li`,null,d(e.$t(`Login.index_28`)),1)]),_:1})]),o(q)?(a(),t(`div`,de,[s(`h3`,z,[r(d(e.$t(`Login.index_35`))+`: `,1),s(`span`,B,d(o(J)?o(G).username:o(U).email),1)]),s(`div`,V,[r(d(e.$t(`Login.index_36`))+`: `,1),i[15]||(i[15]=s(`span`,{class:`underline`},`support@aapanel.com`,-1))]),n(C,null,{default:l(()=>[n(f,{type:`primary`,size:`large`,onClick:i[6]||(i[6]=e=>Q())},{default:l(()=>[r(d(e.$t(`Login.index_37`)),1)]),_:1}),n(f,{size:`large`,onClick:ge,disabled:!o(X)},{default:l(()=>[r(d(e.$t(`Login.index_38`))+` `,1),o(X)?ee(``,!0):(a(),t(`span`,H,`(`+d(o(Y))+`)`,1))]),_:1},8,[`disabled`])]),_:1})])):(a(),t(`div`,P,[n(S,{"default-value":`signup`,size:`large`,animated:``,"onUpdate:value":fe},{default:l(()=>[n(b,{name:`signup`,tab:`Sign up`,class:`text-left`},{default:l(()=>[n(y,{ref_key:`signFormRef`,ref:p,model:o(U),rules:W,size:`large`},{default:l(()=>[n(f,{class:`google-btn`,block:``,size:`large`,onClick:$},{icon:l(()=>[...i[8]||(i[8]=[s(`i`,{class:`i-common:google`},null,-1)])]),default:l(()=>[i[9]||(i[9]=s(`span`,null,`Continue with Google`,-1))]),_:1}),s(`div`,F,[n(m,null,{default:l(()=>[...i[10]||(i[10]=[r(`or`,-1)])]),_:1})]),n(g,{path:`email`},{default:l(()=>[n(h,{value:o(U).email,"onUpdate:value":i[0]||(i[0]=e=>o(U).email=e),placeholder:e.$t(`Config.Alarm.index_3`)},null,8,[`value`,`placeholder`])]),_:1}),n(g,{path:`password`},{default:l(()=>[n(h,{value:o(U).password,"onUpdate:value":i[1]||(i[1]=e=>o(U).password=e),type:`password`,placeholder:e.$t(`Config.Panel.index_66`)},null,8,[`value`,`placeholder`])]),_:1}),n(g,{"show-feedback":!1},{default:l(()=>[n(f,{type:`primary`,onClick:me,size:`large`,block:``},{default:l(()=>[r(d(e.$t(`Login.index_31`)),1)]),_:1})]),_:1})]),_:1},8,[`model`])]),_:1}),n(b,{name:`login`,tab:`Login`,class:`text-left`},{default:l(()=>[n(y,{ref_key:`loginFormRef`,ref:D,model:o(G),rules:K,size:`large`},{default:l(()=>[n(f,{class:`google-btn`,block:``,size:`large`,onClick:$},{icon:l(()=>[...i[11]||(i[11]=[s(`i`,{class:`i-common:google`},null,-1)])]),default:l(()=>[i[12]||(i[12]=s(`span`,null,`Continue with Google`,-1))]),_:1}),s(`div`,I,[n(m,null,{default:l(()=>[...i[13]||(i[13]=[r(`or`,-1)])]),_:1})]),n(g,{path:`username`},{default:l(()=>[n(h,{value:o(G).username,"onUpdate:value":i[2]||(i[2]=e=>o(G).username=e),placeholder:e.$t(`Config.Alarm.index_3`)},null,8,[`value`,`placeholder`])]),_:1}),n(g,{path:`password`},{default:l(()=>[n(h,{value:o(G).password,"onUpdate:value":i[3]||(i[3]=e=>o(G).password=e),type:`password`,placeholder:e.$t(`Config.Panel.index_66`),onKeyup:i[4]||(i[4]=u(te(e=>Q(),[`prevent`]),[`enter`]))},null,8,[`value`,`placeholder`])]),_:1})]),_:1},8,[`model`]),s(`div`,L,[n(f,{type:`primary`,onClick:i[5]||(i[5]=e=>Q()),size:`large`,block:``},{default:l(()=>[r(d(e.$t(`Login.index_32`)),1)]),_:1}),s(`div`,R,[n(x,{target:`_blank`,href:`https://www.aapanel.com/user_admin/login?page=reset`},{default:l(()=>[...i[14]||(i[14]=[r(`Forget Password>>`,-1)])]),_:1})])])]),_:1})]),_:1})]))])]),_:1})}}}),W=e({default:()=>G}),G=D(U,[[`__scopeId`,`data-v-caffe03c`]]);export{W as t};