2 lines
3.1 KiB
JavaScript
2 lines
3.1 KiB
JavaScript
import{c as l,I as h,d as O,u as x,a as V,b as n,w as i,r as c,o as S,e as p,f as z,g as L,h as M,i as P,_ as j}from"./index-iu4REYcj.js";import{L as B}from"./LockOutlined-NIokxtdn.js";var N={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"};function f(r){for(var a=1;a<arguments.length;a++){var t=arguments[a]!=null?Object(arguments[a]):{},e=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(e=e.concat(Object.getOwnPropertySymbols(t).filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable}))),e.forEach(function(s){k(r,s,t[s])})}return r}function k(r,a,t){return a in r?Object.defineProperty(r,a,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[a]=t,r}var m=function(a,t){var e=f({},a,t.attrs);return l(h,f({},e,{icon:N}),null)};m.displayName="MailOutlined";m.inheritAttrs=!1;const A={class:"login-container"},C={class:"login-card"},I=O({__name:"LoginView",setup(r){const a=P(),t=x(),e=L({email:"admin@luckywheel.local",password:"Admin@SecurePass2026"}),s=M(!1);async function _(){s.value=!0;try{await t.login({email:e.email,password:e.password}),a.push("/dashboard")}catch{}finally{s.value=!1}}return(g,o)=>{const v=c("a-input"),u=c("a-form-item"),b=c("a-input-password"),w=c("a-button"),y=c("a-form");return S(),V("div",A,[o[4]||(o[4]=n("div",{class:"login-bg-decorations"},[n("div",{class:"decor-circle circle-1"}),n("div",{class:"decor-circle circle-2"})],-1)),n("div",C,[o[3]||(o[3]=n("div",{class:"header"},[n("div",{class:"logo-wrapper"},[n("span",{class:"logo"},"🎡")]),n("h1",null,"ورود به پنل مدیریت"),n("p",null,"سامانه گردونه شانس و قرعهکشی")],-1)),l(y,{model:e,layout:"vertical",onFinish:_},{default:i(()=>[l(u,{label:"ایمیل مدیریت",name:"email",rules:[{required:!0,message:"لطفاً ایمیل را وارد کنید"},{type:"email",message:"فرمت ایمیل نامعتبر است"}]},{default:i(()=>[l(v,{value:e.email,"onUpdate:value":o[0]||(o[0]=d=>e.email=d),size:"large",placeholder:"admin@example.com"},{prefix:i(()=>[l(p(m),{style:{color:"#6366f1"}})]),_:1},8,["value"])]),_:1}),l(u,{label:"کلمه عبور",name:"password",rules:[{required:!0,message:"لطفاً کلمه عبور را وارد کنید"}]},{default:i(()=>[l(b,{value:e.password,"onUpdate:value":o[1]||(o[1]=d=>e.password=d),size:"large",placeholder:"••••••••"},{prefix:i(()=>[l(p(B),{style:{color:"#6366f1"}})]),_:1},8,["value"])]),_:1}),l(u,{style:{"margin-top":"28px"}},{default:i(()=>[l(w,{type:"primary","html-type":"submit",size:"large",block:"",loading:s.value,class:"login-submit-btn"},{default:i(()=>[...o[2]||(o[2]=[z(" ورود به پنل ",-1)])]),_:1},8,["loading"])]),_:1})]),_:1},8,["model"])])])}}}),H=j(I,[["__scopeId","data-v-20e1793e"]]);export{H as default};
|