Files
tehran_taj/apps/admin-panel/dist/assets/Login-DNvXLB5f.js
T
s.esmaeiliandClaude Opus 5.5 2bbd9408dd build: rebuild the server bundle, admin panel and both apps from main
Fresh release output after merging dev: apps/api/release (server
bundle, migrations and the database client) and the three front-end
dist folders. All three front-ends type-check clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 10:24:53 +03:30

2 lines
2.3 KiB
JavaScript

import{d as C,b as E,c as a,w as n,r as s,o as M,n as t,A as N,f as V,l as u,p as m,z as A,k as L}from"./index-DDKWZYPX.js";import{_ as P}from"./montzar-icon-B0wdL36O.js";import{u as S}from"./auth-DYHJI02F.js";import{_ as T}from"./_plugin-vue_export-helper-DlAUqK2U.js";const U={id:"page-login"},$={class:"login-grid"},F={class:"login-form"},I=C({__name:"Login",setup(J){const w=L(),h=S(),o=u(""),l=u(""),i=u(!1),c=u(!1),f=u(!1),d=m(()=>c.value?o.value?o.value.length<8?"مقدار ورودی صحیح نیست":"":"وارد کردن موبایل الزامی است":""),v=m(()=>f.value?l.value?l.value.length<5?"مقدار ورودی صحیح نیست":"":"وارد کردن رمز عبور الزامی است":""),_=m(()=>!d.value&&!v.value&&o.value!==""&&l.value!=="");async function p(){if(!(!_.value||i.value)){i.value=!0;try{await h.login({phone:o.value,password:l.value}),await w.push("/dashboard/ecommerce")}catch(g){console.log(g),A.error("خطا در ورود")}finally{i.value=!1}}}return(g,e)=>{const x=s("a-input"),b=s("a-form-item"),y=s("a-input-password"),z=s("a-button"),B=s("a-form"),k=s("a-card");return M(),E("div",U,[a(k,{class:"login-card",bordered:!1},{default:n(()=>[t("div",$,[t("div",F,[e[5]||(e[5]=t("div",{class:"vx-card__title"},[t("h4",null,"ورود به محیط مدیریت"),t("p",null,"لطفا شماره تلفن همراه خود به همراه رمز عبور وارد کنید.")],-1)),a(B,{layout:"vertical",class:"mt-8",onSubmit:N(p,["prevent"])},{default:n(()=>[a(b,{label:"موبایل","validate-status":d.value?"error":"",help:d.value},{default:n(()=>[a(x,{value:o.value,"onUpdate:value":e[0]||(e[0]=r=>o.value=r),autocomplete:"off",size:"large",onBlur:e[1]||(e[1]=r=>c.value=!0)},null,8,["value"])]),_:1},8,["validate-status","help"]),a(b,{label:"رمز عبور","validate-status":v.value?"error":"",help:v.value},{default:n(()=>[a(y,{value:l.value,"onUpdate:value":e[2]||(e[2]=r=>l.value=r),size:"large",onBlur:e[3]||(e[3]=r=>f.value=!0),onPressEnter:p},null,8,["value"])]),_:1},8,["validate-status","help"]),a(z,{type:"primary",size:"large",disabled:!_.value,loading:i.value,onClick:p},{default:n(()=>[...e[4]||(e[4]=[V(" ورود ",-1)])]),_:1},8,["disabled","loading"])]),_:1})]),e[6]||(e[6]=t("div",{class:"login-art"},[t("img",{src:P,alt:"Montzar"})],-1))])]),_:1})])}}}),D=T(I,[["__scopeId","data-v-4be9c188"]]);export{D as default};